Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 307
  • Last Modified:

JSP deployment on Tomcat

Hi experts,

I now need to launch a JSP page on Tomcat. I have the web.xml file and the .war file. I put both of them in my tomcat /webapp directory and I got an error message saying that it do not find my packages.

I tried to put my packages with the .war file in the same directory with the .jsp and .xml, I also tried to put them in the WEB-INFO directory too and neither works.

I imagine there's something more I must do. What tag I'll need to edit in the web.xml file and where I am suppose to place these files (.xml, .war, .jsp) on the server?

Please help, I can't find enough information. Any comment will be very appreciate. Thanks in advance.
0
JeromeQc
Asked:
JeromeQc
  • 2
1 Solution
 
cheekycjCommented:
Steps Involved in Deploying a Web Application to Tomcat


Copy your WAR file to the TOMCAT_HOME/webapps directory.

Add a new Context entry to the TOMCAT_HOME/conf/server.xml file, setting the values for the path and docBase to the name of your web application.

<Context path="/yourapp" docBase="yourapp" debug="0" reloadable="true" />

Restart Tomcat after completing these steps. Your application should now be running.

The previously described application can be accessed by pointing your browser at

http://localhost/yourapp/

If you look at the TOMCAT_HOME/webapps directory, you will see a new directory matching the name of your WAR file. This is where your working web application now exists. When Tomcat starts it will extract all WAR files that have been recently placed into the TOMCAT_HOME/webapps directory.

your web.xml and your jsp's will be inside the war file.

take a look at:
http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html

CJ
0
 
JeromeQcAuthor Commented:
Thanks again CJ!
0
 
cheekycjCommented:
Glad I could help and Thanx for the "A"

CJ
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now