if a context for the war file exists in server.xml, the manager uploads the new .war file, but does not expand it, if the necessary directory does not exist, and if the directory exists, it is not overwritten, so you see the old application. see server.xml <Host name="xxx" appBase="webapps" unpackWARs="true"> <Context path="/yyy"> ... if I don't have a context for yyy in server.xml, autodeploy works as expected. Even if you say, remove context from the manager application, it is always there in the application view, you can't remove it. And finally, it never cleans up the work directory for the application yyy, which I guess, is just a subsequent error of the above behaviour.
output of catalina.out, when you deploy an application, where a context exists in server.xml, but $CATALINA_BASE/webapps is empty. INFO: HTMLManager: start: Starting web application at '/yyy' 12.10.2007 13:54:56 org.apache.catalina.core.StandardContext resourcesStart SCHWERWIEGEND: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/tomcat/webapps/yyy/webapps/yyy does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3855) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4024) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1175) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:527) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:104) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:544) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) 12.10.2007 13:54:56 org.apache.catalina.core.StandardContext start
This is fixed in trunk - by providing an error message if you try and upload a file when the associated context is defined in server.xml I have proposed the fix for back-porting to 6.0.x and 5.5.x
Fixed in 5.5.x and will be included in 5.5.26 onwards.