From b8f129a0373cf8e62a86b135c9f83b548494c4cd Mon Sep 17 00:00:00 2001 From: markt Date: Mon, 16 Jul 2007 02:01:01 +0000 Subject: [PATCH] Fix reload problem that only affected ROOT.xml. Ported from 5.5.x git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@556489 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/startup/ContextConfig.java | 10 +++++----- webapps/docs/changelog.xml | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/java/org/apache/catalina/startup/ContextConfig.java b/java/org/apache/catalina/startup/ContextConfig.java index 1b5454603..7ea2b2987 100644 --- a/java/org/apache/catalina/startup/ContextConfig.java +++ b/java/org/apache/catalina/startup/ContextConfig.java @@ -881,12 +881,12 @@ public class ContextConfig 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 @@ public class ContextConfig 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 { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 51e159a70..ad4fab560 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -25,6 +25,11 @@ + 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) + + Remove invalid attribute "encoding" of MBean MemoryUserDatabase, which lead to errors in the manager webapp JMXProxy output. (rjung) -- 2.11.0