Handle nested contexts when foo#bar.xml exists
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 6 Oct 2008 17:30:44 +0000 (17:30 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 6 Oct 2008 17:30:44 +0000 (17:30 +0000)
Bug reported on users list

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@702208 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/ContextConfig.java

index 0899667..78c91af 100644 (file)
@@ -854,9 +854,9 @@ public class ContextConfig
                 docBase = "ROOT";
             } else {
                 if (path.startsWith("/")) {
-                    docBase = path.substring(1);
+                    docBase = path.substring(1).replace('/', '#');
                 } else {
-                    docBase = path;
+                    docBase = path.replace('/', '#');
                 }
             }
         }