| Article: |
Deploying Web Applications to Tomcat | |
| Subject: | Creating and Deploying a WAR File Step 4 | |
| Date: | 2002-08-20 15:03:09 | |
| From: | taylormaai | |
|
In step 4 of "Creating and Deploying a WAR File" section, I think it would of been nice to mention you have to change the context entry value to docBase="onjava.war".
|
||
Showing messages 1 through 2 of 2.
-
Creating and Deploying a WAR File Step 4
2002-08-26 10:44:05 slimd [View]
-
Creating and Deploying a WAR File Step 4
2003-10-15 12:14:27 anonymous2 [View]
Tomcat documentation (and this article as well) are misleading by not stating that a .war file will only be expanded by Tomcat if you DON'T have a <Context ....> defined with a "docBase" attribute that matches the name of the .war file minus ".war).



http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/deployment.html
It references your question. Here is the paragraph that I believe provides insight to your comment.
Copy the web application archive file into directory $CATALINA_HOME/webapps/. When Tomcat is started, it will automatically expand the web application archive file into its unpacked form, and execute the application that way. This approach would typically be used to install an additional application, provided by a third party vendor or by your internal development staff, into an existing Tomcat installation. NOTE - If you use this approach, and wish to update your application later, you must both replace the web application archive file AND delete the expanded directory that Tomcat created, and then restart Tomcat, in order to reflect your changes.