tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: WARs getting re-extracted in DST change?!?
Date Wed, 06 Nov 2013 07:21:02 GMT
On 06/11/2013 02:02, James H. H. Lampert wrote:
> First of all, sorry about being grouchy. Just after I sent my irate
> reply, Mr. Schultz, I saw that you'd seen and replied to my more
> detailed posting, the one with the log excerpts, and a certain two-word
> scatological phrase immediately popped into my head.
> I've had a chance to try some things. With autoDeploy on, if a WAR file
> in webapps is deleted, then the context associated with it quickly
> follows, whether it was deployed by autoDeploy or by Manager.
> But if a context is deployed by calling jar on a WAR file that's outside
> webapps, then (at least so long as the WAR file never makes it into
> webapps) it's immune to being automatically undeployed.
> If I deploy a context using Manager, the WAR file gets copied into
> webapps, making the context vulnerable to being auto-undeployed.
> The autoDeploy flag lives near the bottom of tomcat/conf/server.xml.
> Do I have this right so far?

Yes, but there are a number of edge cases in all the above. The Tomcat 8
docs cover this in a lot more detail:

I think there are a few cases where Tomcat 7 is not quite consistent
with this (back-porting the docs and the associated changes are on my
TODO list). In most cases, Tomcat 7 should be consistent with this.

> By my slightly addled understanding of the Configuration Reference, the
> deployOnStartup flag also lives there, and defaults to true; yet I don't
> see it there. I haven't seen any contexts stomped on and reset to their
> default configurations on launching Tomcat, but this does scare me a bit.

deployOnStartUp runs an automatic deployment cycle with one key
difference - it has no records of the last modified timestamps so it
assumes that nothing has changed and will not undeploy anything. This is
why if you update a WAR while Tomcat is shut down and do not delete the
associated expanded directory (which is the expanded old version) when
Tomcat restarts Tomcat assumes the directory is the result of expanding
the WAR and deploys the directory.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message