Jesse Vitrone wrote:

When I try to install my application, I put the war file in the webapps
directory, and in the server.xml I add a <context> mapping.  When I start
Tomcat, my war file isn't getting extracted.

Unpack wars is set to true:

<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true">

If I comment out my <context>, the war gets extracted, but I need the
context mapping. Once the war is extracted, I can put the <context> mapping
in and everything works fine.


Any idea why my war isn't getting extracted when the mapping is in there?




Here's what I think is the reason, but I may be wrong ...

If you are deploying a WAR file, Tomcat doesn't need to know anything about it initially (that is, no context entry in server.xml). You just create a directory, drop the WAR package there and start Tomcat. The WAR file will get unpackaged. No entry will be added into server.xml though.

If you add the context mapping before deploying the WAR file, Tomcat assumes that you know what you are doing and automatically expects a web application at the docBase location, not a WAR file. If it finds a WAR file, it will assume that there is an error (because it is not finding what it expects to find).

Am I close ? Anyway, whatever the reason, I don't think switching to Tomcat 5 will change this behaviour. I've done a little testing with WAR packages -- though not extensively.

--
"We must respect the other fellow's religion, but only in the sense and
to the extent that we respect his theory that his wife is beautiful and
his children are smart." -- Henry Mencken
+----------------------------------------------------------------+
| Pascal Chong |
| email: [EMAIL PROTECTED] |
| |
| Please visit my site at : http://cymulacrum.net |
| If you're using my documentation, please read the Terms and |
| and Conditions at http://cymulacrum.net/terms.html |
+----------------------------------------------------------------+




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to