geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r485998 - /geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Date Tue, 12 Dec 2006 03:15:07 GMT
Author: pmcmahan
Date: Mon Dec 11 19:15:06 2006
New Revision: 485998

URL: http://svn.apache.org/viewvc?view=rev&rev=485998
Log:
GERONIMO-2646: WAR without a geronimo-web.xml deploys to the wrong context

check default context root created by AbstractWebModuleBuilder to see if it already starts
with a '/'

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

Modified: geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?view=diff&rev=485998&r1=485997&r2=485998
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Mon Dec 11 19:15:06 2006
@@ -250,7 +250,11 @@
 
     private TomcatWebAppType createDefaultPlan(String path) {
         TomcatWebAppType tomcatWebApp = TomcatWebAppType.Factory.newInstance();
-        tomcatWebApp.setContextRoot("/" + path);
+        if (path!=null && !path.startsWith("/")) {
+            tomcatWebApp.setContextRoot("/" + path);
+        } else {
+            tomcatWebApp.setContextRoot(path);
+        }
         return tomcatWebApp;
     }
 



Mime
View raw message