You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/06/21 13:10:47 UTC

svn commit: r1137957 - in /tomcat/trunk: java/org/apache/catalina/startup/WebRuleSet.java webapps/docs/changelog.xml

Author: markt
Date: Tue Jun 21 11:10:47 2011
New Revision: 1137957

URL: http://svn.apache.org/viewvc?rev=1137957&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51401
Correctly initialise shared WebRuleSet instance used by the digesters that parse web.xml and prevent incorrect warnings about multiple occurrences of elements that are only allowed to appear once in web.xml and web-fragment.xml.
Patch by kfujino

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

Modified: tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java?rev=1137957&r1=1137956&r2=1137957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java Tue Jun 21 11:10:47 2011
@@ -77,19 +77,19 @@ public class WebRuleSet extends RuleSetB
     /**
      * The <code>SetSessionConfig</code> rule used to parse the web.xml
      */
-    protected SetSessionConfig sessionConfig;
+    protected SetSessionConfig sessionConfig = new SetSessionConfig();
     
     
     /**
      * The <code>SetLoginConfig</code> rule used to parse the web.xml
      */
-    protected SetLoginConfig loginConfig;
+    protected SetLoginConfig loginConfig = new SetLoginConfig();
 
     
     /**
      * The <code>SetJspConfig</code> rule used to parse the web.xml
      */    
-    protected SetJspConfig jspConfig;
+    protected SetJspConfig jspConfig = new SetJspConfig();
 
 
     // ------------------------------------------------------------ Constructor
@@ -153,10 +153,6 @@ public class WebRuleSet extends RuleSetB
      */
     @Override
     public void addRuleInstances(Digester digester) {
-        sessionConfig = new SetSessionConfig();
-        jspConfig = new SetJspConfig();
-        loginConfig = new SetLoginConfig();
-        
         digester.addRule(fullPrefix,
                          new SetPublicIdRule("setPublicId"));
         digester.addRule(fullPrefix,

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1137957&r1=1137956&r2=1137957&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jun 21 11:10:47 2011
@@ -106,6 +106,12 @@
         <bug>51396</bug>: Correctly handle jsp-file entries in web.xml when the
         JSP servlet has been configured via code when embedding Tomcat. (markt)
       </fix>
+      <fix>
+        <bug>51401</bug>: Correctly initialise shared WebRuleSet instance used
+        by the digesters that parse web.xml and prevent incorrect warnings about
+        multiple occurrences of elements that are only allowed to appear once in
+        web.xml and web-fragment.xml. (kfujino)
+      </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