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: http://tomcat.apache.org/tomcat-8.0-doc/config/automatic-deployment.html 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. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org