Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 14224 invoked from network); 24 Jul 2004 19:56:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 Jul 2004 19:56:02 -0000 Received: (qmail 37743 invoked by uid 500); 24 Jul 2004 19:55:52 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 37671 invoked by uid 500); 24 Jul 2004 19:55:51 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 37657 invoked by uid 99); 24 Jul 2004 19:55:51 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.27.1) with SMTP; Sat, 24 Jul 2004 12:55:49 -0700 Received: (qmail 5595 invoked by uid 50); 24 Jul 2004 19:57:10 -0000 Date: 24 Jul 2004 19:57:10 -0000 Message-ID: <20040724195710.5594.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 29526] - Cannot undeploy and deploy war file with on the same context X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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=29526 Cannot undeploy and deploy war file with on the same context ------- Additional Comments From cr@apama.com 2004-07-24 19:57 ------- Not using Windows isn't always an option... The changes for 28272 uses the jar URL to see if the context.xml file exists inside the .war. The jar URL connection class caches by default, and leaves a file descriptor open to the jar file. By disabling caching, it doesn't and the jar file can be deleted. --- ManagerServlet.java.orig Thu Jun 17 21:02:56 2004 +++ ManagerServlet.java Sat Jul 24 20:40:52 2004 @@ -27,6 +27,7 @@ import java.io.IOException; import java.io.PrintWriter; import java.net.URL; +import java.net.URLConnection; import java.net.MalformedURLException; import java.util.Iterator; import java.util.jar.JarEntry; @@ -845,7 +846,9 @@ } contextXml = new URL(contextWar + "META-INF/context.xml"); - stream = contextXml.openStream(); + URLConnection jarUrlConnection=contextXml.openConnection(); + jarUrlConnection.setUseCaches(false); + stream = jarUrlConnection.getInputStream();; // WAR contains META-INF/context.xml resource - install deployer.install(new URL(contextWar)); return; --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org