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:46:22 UTC
svn commit: r637227 -
/geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
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;
}