You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/07/21 18:01:17 UTC

DO NOT REPLY [Bug 35819] New: - Removal of WorkDir on undeploy

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35819>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35819

           Summary: Removal of WorkDir on undeploy
           Product: Tomcat 5
           Version: 5.5.9
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: rsteele@pharmanet.com


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));
     }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org