geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject svn commit: r637227 - /geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Date Fri, 14 Mar 2008 19:46:22 GMT
Author: jaydm
Date: Fri Mar 14 12:46:20 2008
New Revision: 637227

URL: http://svn.apache.org/viewvc?rev=637227&view=rev
Log:
GERONIMO-3921
getContextRoot() should return "" for apps deployed to the root context.

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

Modified: geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=637227&r1=637226&r2=637227&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Fri Mar 14 12:46:20 2008
@@ -264,9 +264,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