geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r638438 - /geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Date Tue, 18 Mar 2008 16:47:45 GMT
Author: dwoods
Date: Tue Mar 18 09:47:35 2008
New Revision: 638438

URL: http://svn.apache.org/viewvc?rev=638438&view=rev
Log:
GERONIMO-3921 getContextRoot() returns forward slash rather than empty string for apps deployed
to root context

Modified:
    geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java

Modified: geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=638438&r1=638437&r2=638438&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Tue Mar 18 09:47:35 2008
@@ -228,9 +228,13 @@
             contextRoot = determineDefaultContextRoot(webApp, standAlone, moduleFile, targetPath);
         }
         contextRoot = contextRoot.trim();
-        if (!contextRoot.startsWith("/")) {
-            //I'm not sure if we should always fix up peculiar context roots.
-            contextRoot = "/" + contextRoot;
+        if (contextRoot.length() > 0) {
+            // only force the context root to start with a forward slash
+            // if it is not null
+            if (!contextRoot.startsWith("/")) {
+                //I'm not sure if we should always fix up peculiar context roots.
+                contextRoot = "/" + contextRoot;
+            }
         }
         return contextRoot;
     }



Mime
View raw message