Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 67778 invoked from network); 1 Oct 2005 20:13:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Oct 2005 20:13:57 -0000 Received: (qmail 65151 invoked by uid 500); 1 Oct 2005 20:13:57 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 65004 invoked by uid 500); 1 Oct 2005 20:13:56 -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 64993 invoked by uid 99); 1 Oct 2005 20:13:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2005 13:13:56 -0700 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 01 Oct 2005 13:14:01 -0700 Received: (qmail 67532 invoked by uid 65534); 1 Oct 2005 20:13:35 -0000 Message-ID: <20051001201335.67531.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r293023 - in /geronimo/branches/1.0-M5/modules: tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java Date: Sat, 01 Oct 2005 20:13:34 -0000 To: scm@geronimo.apache.org From: djencks@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: djencks Date: Sat Oct 1 13:13:28 2005 New Revision: 293023 URL: http://svn.apache.org/viewcvs?rev=293023&view=rev Log: GERONIMO-1036 resolve absolute location of configuration at runtime Modified: geronimo/branches/1.0-M5/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java geronimo/branches/1.0-M5/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java Modified: geronimo/branches/1.0-M5/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=293023&r1=293022&r2=293023&view=diff ============================================================================== --- geronimo/branches/1.0-M5/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java (original) +++ geronimo/branches/1.0-M5/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java Sat Oct 1 13:13:28 2005 @@ -405,7 +405,7 @@ Set securityRoles = collectRoleNames(webApp); Map rolePermissions = new HashMap(); - URI baseUri = earContext.getTargetFile(URI.create(webModule.getTargetPath() + "/")).toURI(); + URI baseUri = URI.create(webModule.getTargetPath() + "/"); webModuleData.setAttribute("webAppRoot", baseUri); webModuleData.setAttribute("contextPath", webModule.getContextRoot()); Modified: geronimo/branches/1.0-M5/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java?rev=293023&r1=293022&r2=293023&view=diff ============================================================================== --- geronimo/branches/1.0-M5/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java (original) +++ geronimo/branches/1.0-M5/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java Sat Oct 1 13:13:28 2005 @@ -75,7 +75,7 @@ private final Realm realm; private final List valveChain; - + private final boolean crossContext; private final Map componentContext; @@ -108,7 +108,7 @@ ClassLoader classLoader, String objectName, String originalSpecDD, - URI webAppRoot, + URI relativeWebAppRoot, URI[] webClassPath, boolean contextPriorityClassLoader, URL configurationBaseUrl, @@ -132,7 +132,7 @@ throws Exception { assert classLoader != null; - assert webAppRoot != null; + assert relativeWebAppRoot != null; assert webClassPath != null; assert configurationBaseUrl != null; assert transactionContextManager != null; @@ -142,7 +142,14 @@ this.objectName = objectName; - this.webAppRoot = webAppRoot; + URI root = null; + //TODO is there a simpler way to do this? + if (configurationBaseUrl.getProtocol().equalsIgnoreCase("file")) { + root = new URI("file", configurationBaseUrl.getPath(), null); + } else { + root = URI.create(configurationBaseUrl.toString()); + } + this.webAppRoot = root.resolve(relativeWebAppRoot); this.container = container; this.originalSpecDD = originalSpecDD; @@ -181,17 +188,11 @@ } else { valveChain = null; } - + this.crossContext = crossContext; this.webServices = webServices; - URI root = URI.create(configurationBaseUrl.toString()); - if (configurationBaseUrl.getProtocol().equalsIgnoreCase("file")) { - root = new URI("file", configurationBaseUrl.getPath(), null); - } else { - root = URI.create(configurationBaseUrl.toString()); - } URL webAppRootURL = webAppRoot.toURL(); URL[] urls = new URL[webClassPath.length]; @@ -200,7 +201,7 @@ classPathEntry = root.resolve(classPathEntry); urls[i] = classPathEntry.toURL(); } - + this.webClassLoader = new TomcatClassLoader(urls, webAppRootURL, classLoader, contextPriorityClassLoader); this.kernel = kernel; @@ -318,10 +319,10 @@ String[] result = null; if ((context != null) && (context instanceof StandardContext)) result = ((StandardContext)context).getServlets(); - + return result; } - + /** * ObjectName must match this pattern:

* domain:j2eeType=WebModule,name=MyName,J2EEServer=MyServer,J2EEApplication=MyApplication