You probably have the context defined in server.xml, right? If so, you have to expand the directory yourself before Tomcat starts. The
auto-deploy will only work if you *don't* have a <Context ....> defined with a "docBase" attribute that matches the name of the .war file
(minus ".war).
For instance, if you have the following in server.xml....
<Context path="/myapp" docBase="myapp" debug="0"/>
and you start Tomcat either with myapp.war in webapps or drop myapp.war into webapps after Tomcat is started, the context at path "/myapp" will *not* be deployed because Tomcat won't expand the .war file to a directory of the same name and the docBase points to the directory, not the .war file.
However, if you had the following:
<Context path="/myapp" docBase="myapp.war" debug="0"/>
And you put myapp.war in webapps and then started Tomcat, it should work becuse the docBase actually points to the war file.
Bottom line, if you define the context in server.xml and want the directory deployed instead of the .war file, expand the directory yourself and then start Tomcat.
You might say, well that sucks. Well, the behavior is controversial and has been discussed before on the list. If you don't like the behavior, contact the Tomcat developers and make an argument for changing the behavior.
Jake
At 09:57 PM 11/11/2002 -0800, you wrote:
In the Application Developer at the page noted below, I find information about the behavior of a .war file.
http://localhost:8080/tomcat-docs/appdev/deployment.html
It says:
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.
-------------------------------------------------------------------------------
My war file does not seem to expand automatically.
Has the behavior changed in 4.1.12 ?
What conditions might account for the failure of a war file built with ANT war task
to not expand?
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
