tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r649974 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
Date Sun, 20 Apr 2008 20:47:59 GMT
Author: markt
Date: Sun Apr 20 13:47:57 2008
New Revision: 649974

URL: http://svn.apache.org/viewvc?rev=649974&view=rev
Log:
Fix bug 29936. In some circumstances, Tomcat would use the parser from a webapp to parse web.xml
and possibly context.xml files.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

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=649974&r1=649973&r2=649974&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Sun Apr 20 13:47:57 2008
@@ -339,10 +339,6 @@
         
         long t1=System.currentTimeMillis();
 
-        if (webDigester == null){
-            webDigester = createWebDigester();
-        }
-        
         URL url=null;
         // Process the application web.xml file
         synchronized (webDigester) {
@@ -624,10 +620,6 @@
                       + " " + defaultWebXml + " " + file , e);
         }
 
-        if (webDigester == null){
-            webDigester = createWebDigester();
-        }
-        
         if (stream != null) {
             processDefaultWebConfig(webDigester, stream, source);
             webRuleSet.recycle();
@@ -786,9 +778,6 @@
         
         if (source == null)
             return;
-        if (contextDigester == null){
-            contextDigester = createContextDigester();
-        }
         synchronized (contextDigester) {
             try {
                 source.setByteStream(stream);
@@ -996,6 +985,16 @@
      */
     protected void init() {
         // Called from StandardContext.init()
+
+        if (webDigester == null){
+            webDigester = createWebDigester();
+            webDigester.getParser();
+        }
+        
+        if (contextDigester == null){
+            contextDigester = createContextDigester();
+            contextDigester.getParser();
+        }
 
         if (log.isDebugEnabled())
             log.debug(sm.getString("contextConfig.init"));



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


Mime
View raw message