jboynes 2004/01/26 22:05:43
Modified: modules/jetty/src/java/org/apache/geronimo/jetty/deployment JettyModule.java Log: Fix incorrect location of WAR inside the configuration. For some reason on Sun 1.4.2/WinXP URI.isAbsolute("/test") is false Revision Changes Path 1.6 +6 -3 incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModule.java Index: JettyModule.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModule.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- JettyModule.java 26 Jan 2004 05:55:27 -0000 1.5 +++ JettyModule.java 27 Jan 2004 06:05:43 -0000 1.6 @@ -114,12 +114,15 @@ contextPath = contextPath.substring(0, contextPath.length() - 4); } contextPath = XMLUtil.getChildContent(deploymentPlan.getDocumentElement(), "context-root", contextPath, contextPath); + if (!contextPath.startsWith("/")) { + contextPath = "/" + contextPath; + } } public void init() throws DeploymentException { super.init(); - - uri = URI.create(contextPath + "/"); + assert contextPath.startsWith("/") : "Did not ensure contextPath is absolute"; + uri = URI.create(contextPath.substring(1) + "/"); classes = uri.resolve("WEB-INF/classes/"); lib = uri.resolve("WEB-INF/lib/"); }