You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ja...@apache.org on 2008/03/14 20:39:01 UTC
svn commit: r637223 -
/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Author: jaydm
Date: Fri Mar 14 12:39:00 2008
New Revision: 637223
URL: http://svn.apache.org/viewvc?rev=637223&view=rev
Log:
GERONIMO-3921
getContextRoot() should return "" for apps deployed to the root context.
Modified:
geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=637223&r1=637222&r2=637223&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java Fri Mar 14 12:39:00 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;
}