Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 67995 invoked from network); 14 Mar 2008 19:46:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2008 19:46:43 -0000 Received: (qmail 30541 invoked by uid 500); 14 Mar 2008 19:46:40 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 30397 invoked by uid 500); 14 Mar 2008 19:46:40 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 30388 invoked by uid 99); 14 Mar 2008 19:46:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2008 12:46:40 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2008 19:46:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7F8E41A9838; Fri, 14 Mar 2008 12:46:22 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: scm@geronimo.apache.org From: jaydm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080314194622.7F8E41A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; }