When an app is undeployed via the manager (that was previously deployed with the manager), its associated work directory is not removed from Tomcat. This is on Windows 2000, whether Tomcat is executed as a service OR from the command line. This can lead to stale JSPs being executed, among other things. Looking at the source code, it appears as though the work dir was *intended* to be removed when the Context is destroyed. The following patch to the 5.5.9 code base seems to fix the problem: --- jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java.orig 2005-03-26 13:24:02.000000000 -0500 +++ jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java 2005-07-15 15:00:36.156708000 -0400 @@ -1240,7 +1240,7 @@ // Called from StandardContext.destroy() if (log.isDebugEnabled()) log.debug(sm.getString("contextConfig.destroy")); - String workDir = ((StandardContext) context).getWorkDir(); + String workDir = ((StandardContext) context).getWorkPath(); if (workDir != null) ExpandWar.delete(new File(workDir)); }
I've implemented this for 5.5.10: thanks for the contribution.