tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1074914 - in /tomcat/trunk: java/org/apache/catalina/startup/ContextConfig.java webapps/docs/changelog.xml
Date Sat, 26 Feb 2011 20:01:11 GMT
Author: markt
Date: Sat Feb 26 20:01:10 2011
New Revision: 1074914

URL: http://svn.apache.org/viewvc?rev=1074914&view=rev
Log:
Ensure a web application is taken out of service if the web.xml file is not valid.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1074914&r1=1074913&r2=1074914&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Sat Feb 26 20:01:10 2011
@@ -1222,7 +1222,9 @@ public class ContextConfig
                 orderedFragments = WebXml.orderWebFragments(webXml, fragments);
     
                 // Step 3. Look for ServletContainerInitializer implementations
-                ok = processServletContainerInitializers(orderedFragments);
+                if (ok) {
+                    processServletContainerInitializers(orderedFragments);
+                }
     
                 // Step 4. Process /WEB-INF/classes for annotations
                 // This will add any matching classes to the typeInitializerMap
@@ -1274,7 +1276,6 @@ public class ContextConfig
                 }
             } else {
                 webXml.configureContext(context);
-                ok = true;
             }
             
             // Always need to look for static resources
@@ -1362,7 +1363,7 @@ public class ContextConfig
      * Scan JARs for ServletContainerInitializer implementations.
      * Implementations will be added in web-fragment.xml priority order.
      */
-    protected boolean processServletContainerInitializers(
+    protected void processServletContainerInitializers(
             Set<WebXml> fragments) {
         
         for (WebXml fragment : fragments) {
@@ -1393,7 +1394,8 @@ public class ContextConfig
                 log.error(sm.getString(
                         "contextConfig.servletContainerInitializerFail", url,
                         context.getName()));
-                return false;
+                ok = false;
+                return;
             } finally {
                 if (is != null) {
                     try {
@@ -1435,7 +1437,6 @@ public class ContextConfig
             }
 
         }
-        return true;
     }
     
     

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1074914&r1=1074913&r2=1074914&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sat Feb 26 20:01:10 2011
@@ -147,6 +147,10 @@
         embedded Tomcat instance that includes at least one Context is destroyed
         without ever being started. (markt)
       </fix>
+      <fix>
+        Ensure a web application is taken out of service if the web.xml file is
+        not valid. (kkolinko/markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message