geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r109648 - in geronimo/branches/djencks/jetty-deployer1/trunk/modules: jetty-builder/src/java/org/apache/geronimo/jetty/deployment jetty/src/java/org/apache/geronimo/jetty
Date Fri, 03 Dec 2004 08:14:12 GMT
Author: djencks
Date: Fri Dec  3 00:14:11 2004
New Revision: 109648

URL: http://svn.apache.org/viewcvs?view=rev&rev=109648
Log:
allow servlets with no servlet mappings
Modified:
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java

Modified: geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?view=diff&rev=109648&p1=geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java&r1=109647&p2=geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java&r2=109648
==============================================================================
--- geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Fri Dec  3 00:14:11 2004
@@ -34,6 +34,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Collections;
 import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 import javax.management.MalformedObjectNameException;
@@ -634,7 +635,9 @@
                     Integer loadOnStartup = new Integer(servletType.getLoadOnStartup().getBigIntegerValue().intValue());
                     servletData.setAttribute("loadOnStartup", loadOnStartup);
                 }
-                servletData.setAttribute("servletMappings", servletMappings.get(servletName));
+
+                Set mappings = (Set) servletMappings.get(servletName);
+                servletData.setAttribute("servletMappings", mappings == null? Collections.EMPTY_SET:
mappings);
 
                 //WebRoleRefPermissions
                 SecurityRoleRefType[] securityRoleRefTypeArray = servletType.getSecurityRoleRefArray();

Modified: geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java?view=diff&rev=109648&p1=geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java&r1=109647&p2=geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java&r2=109648
==============================================================================
--- geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
(original)
+++ geronimo/branches/djencks/jetty-deployer1/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
Fri Dec  3 00:14:11 2004
@@ -436,9 +436,11 @@
     public void registerServletHolder(ServletHolder servletHolder, String servletName, Set
servletMappings, Map webRoleRefPermissions) throws PolicyContextException {
         //TODO filters
         handler.addServletHolder(servletHolder);
-        for (Iterator iterator = servletMappings.iterator(); iterator.hasNext();) {
-            String urlPattern = (String) iterator.next();
-            handler.mapPathToServlet(urlPattern, servletName);
+        if (servletMappings != null) {
+            for (Iterator iterator = servletMappings.iterator(); iterator.hasNext();) {
+                String urlPattern = (String) iterator.next();
+                handler.mapPathToServlet(urlPattern, servletName);
+            }
         }
     }
 

Mime
View raw message