geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r224409 - /geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
Date Fri, 22 Jul 2005 21:52:10 GMT
Author: djencks
Date: Fri Jul 22 14:52:07 2005
New Revision: 224409

URL: http://svn.apache.org/viewcvs?rev=224409&view=rev
Log:
GERONIMO-642 uri with spaces problem

Modified:
    geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java?rev=224409&r1=224408&r2=224409&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
(original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
Fri Jul 22 14:52:07 2005
@@ -97,8 +97,8 @@
     private String displayName;
     private final String[] welcomeFiles;
 
-    private final  BeforeAfter chain;
-    private final  int contextLength;
+    private final BeforeAfter chain;
+    private final int contextLength;
     private final SecurityContextBeforeAfter securityInterceptor;
     private static final String[] J2EE_TYPES = {NameFactory.SERVLET};
 
@@ -188,7 +188,13 @@
 
         setConfigurationClassNames(new String[]{});
 
-        URI root = URI.create(configurationBaseUrl.toString());
+        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());
+        }
         webAppRoot = root.resolve(uri);
         URL webAppRootURL = webAppRoot.toURL();
 
@@ -264,7 +270,7 @@
         FilterHolder jsr154FilterHolder = new FilterHolder(handler, "jsr154", JSR154Filter.class.getName());
         handler.addFilterHolder(jsr154FilterHolder);
         jsr154FilterHolder.setInitParameter("unwrappedDispatch", "true");
-        handler.addFilterPathMapping("/*", "jsr154", Dispatcher.__REQUEST | Dispatcher.__FORWARD
| Dispatcher.__INCLUDE | Dispatcher.__ERROR );
+        handler.addFilterPathMapping("/*", "jsr154", Dispatcher.__REQUEST | Dispatcher.__FORWARD
| Dispatcher.__INCLUDE | Dispatcher.__ERROR);
     }
 
     public String getObjectName() {
@@ -309,7 +315,7 @@
             return;
         }
 
-        ((AbstractSessionManager)getServletHandler().getSessionManager()).setUseRequestedId(true);
+        ((AbstractSessionManager) getServletHandler().getSessionManager()).setUseRequestedId(true);
 
         setWAR(webAppRoot.toString());
 
@@ -478,6 +484,7 @@
             throw new InvalidObjectNameException("WebModule object name can only have j2eeType,
name, J2EEApplication, and J2EEServer properties", objectName);
         }
     }
+
     public void registerServletHolder(ServletHolder servletHolder, String servletName, Set
servletMappings, Map webRoleRefPermissions) throws Exception {
         //TODO filters
         handler.addServletHolder(servletHolder);
@@ -499,11 +506,11 @@
     }
 
     public boolean checkSecurityConstraints(String pathInContext, HttpRequest request, HttpResponse
response) throws HttpException, IOException {
-         if (securityInterceptor != null) {
-             return securityInterceptor.checkSecurityConstraints(pathInContext, request,
response);
-         }
-         return super.checkSecurityConstraints(pathInContext, request, response);
-     }
+        if (securityInterceptor != null) {
+            return securityInterceptor.checkSecurityConstraints(pathInContext, request, response);
+        }
+        return super.checkSecurityConstraints(pathInContext, request, response);
+    }
 
 
     public static final GBeanInfo GBEAN_INFO;



Mime
View raw message