geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: rev 54925 - geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/deployment
Date Sat, 16 Oct 2004 15:41:29 GMT
Author: adc
Date: Sat Oct 16 08:41:29 2004
New Revision: 54925

Modified:
   geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Log:
Account for optional elements.

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Sat Oct 16 08:41:29 2004
@@ -38,7 +38,6 @@
 import javax.management.ObjectName;
 import javax.management.ReflectionException;
 import javax.transaction.UserTransaction;
-import javax.xml.namespace.QName;
 
 import org.apache.geronimo.deployment.DeploymentException;
 import org.apache.geronimo.deployment.service.GBeanHelper;
@@ -84,7 +83,6 @@
 
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlCursor;
 
 
 /**
@@ -121,6 +119,8 @@
             // parse it
             WebAppDocument webAppDoc = SchemaConversionUtils.convertToServletSchema(SchemaConversionUtils.parse(specDD));
             webApp = webAppDoc.getWebApp();
+        } catch (XmlException xmle) {
+            throw new DeploymentException("Error parsing web.xml", xmle);
         } catch (Exception e) {
             return null;
         }
@@ -524,7 +524,9 @@
 
         FilterMappingType[] filterMappings = webApp.getFilterMappingArray();
         for (int i = 0; i < filterMappings.length; i++) {
-            checkString(filterMappings[i].getUrlPattern().getStringValue());
+            if (filterMappings[i].isSetUrlPattern()) {
+                checkString(filterMappings[i].getUrlPattern().getStringValue());
+            }
         }
 
         ServletMappingType[] servletMappings = webApp.getServletMappingArray();

Mime
View raw message