Author: markt Date: Sun Jul 15 19:01:01 2007 New Revision: 556489 URL: http://svn.apache.org/viewvc?view=rev&rev=556489 Log: Fix reload problem that only affected ROOT.xml. Ported from 5.5.x
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java?view=diff&rev=556489&r1=556488&r2=556489 ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java Sun Jul 15 19:01:01 2007 @@ -881,12 +881,12 @@ file = new File(docBase); String origDocBase = docBase; + String contextPath = context.getPath(); + if (contextPath.equals("")) { + contextPath = "ROOT"; + } if (docBase.toLowerCase().endsWith(".war") && !file.isDirectory() && unpackWARs) { URL war = new URL("jar:" + (new File(docBase)).toURL() + "!/"); - String contextPath = context.getPath(); - if (contextPath.equals("")) { - contextPath = "ROOT"; - } docBase = ExpandWar.expand(host, war, contextPath); file = new File(docBase); docBase = file.getCanonicalPath(); @@ -900,7 +900,7 @@ if (warFile.exists()) { if (unpackWARs) { URL war = new URL("jar:" + warFile.toURL() + "!/"); - docBase = ExpandWar.expand(host, war, context.getPath()); + docBase = ExpandWar.expand(host, war, contextPath); file = new File(docBase); docBase = file.getCanonicalPath(); } else { Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=556489&r1=556488&r2=556489 ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Jul 15 19:01:01 2007 @@ -25,6 +25,11 @@ <subsection name="Catalina"> <changelog> <fix> + Handle special case of ROOT when re-loading webapp after ROOT.xml has + been modified. In some circumstances the reloaded ROOT webapp had no + associated resources. (markt) + </fix> + <fix> Remove invalid attribute "encoding" of MBean MemoryUserDatabase, which lead to errors in the manager webapp JMXProxy output. (rjung) </fix> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]