Correct error messages. Should be context.xml not web.xml
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 27 Jan 2007 21:00:07 +0000 (21:00 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 27 Jan 2007 21:00:07 +0000 (21:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@500616 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/ContextConfig.java
java/org/apache/catalina/startup/LocalStrings.properties
webapps/docs/changelog.xml

index 27328a0..1b54546 100644 (file)
@@ -780,8 +780,8 @@ public class ContextConfig
                 context.addWatchedResource(file.getAbsolutePath());
             }
         } catch (Exception e) {
-            log.error(sm.getString("contextConfig.defaultMissing") 
-                      + " " + resourceName + " " + file , e);
+            log.error(sm.getString("contextConfig.contextMissing",  
+                      resourceName + " " + file) , e);
         }
         
         if (source == null)
@@ -805,13 +805,15 @@ public class ContextConfig
                     log.debug("Successfully processed context [" + context.getName() 
                             + "] configuration file " + baseDir + " " + resourceName);
             } catch (SAXParseException e) {
-                log.error(sm.getString("contextConfig.defaultParse"), e);
+                log.error(sm.getString("contextConfig.contextParse",
+                        context.getName()), e);
                 log.error(sm.getString("contextConfig.defaultPosition",
                                  "" + e.getLineNumber(),
                                  "" + e.getColumnNumber()));
                 ok = false;
             } catch (Exception e) {
-                log.error(sm.getString("contextConfig.defaultParse"), e);
+                log.error(sm.getString("contextConfig.contextParse",
+                        context.getName()), e);
                 ok = false;
             } finally {
                 contextDigester.reset();
@@ -821,7 +823,7 @@ public class ContextConfig
                         stream.close();
                     }
                 } catch (IOException e) {
-                    log.error(sm.getString("contextConfig.defaultClose"), e);
+                    log.error(sm.getString("contextConfig.contextClose"), e);
                 }
             }
         }
index b376dfe..09bd287 100644 (file)
@@ -11,6 +11,9 @@ contextConfig.authenticatorResources=Cannot load authenticators mapping list
 contextConfig.cce=Lifecycle event data object {0} is not a Context
 contextConfig.certificatesConfig.added=Added certificates -> request attribute Valve
 contextConfig.certificatesConfig.error=Exception adding CertificatesValve:
+contextConfig.contextClose=Error closing context.xml
+contextConfig.contextMissing=Missing context.xml: {0}
+contextConfig.contextParse=Parse error in context.xml for {0}
 contextConfig.defaultClose=Error closing default web.xml
 contextConfig.defaultConfig=Configuration error in default web.xml
 contextConfig.defaultMissing=Missing default web.xml, using application web.xml only
index 5676401..597efaa 100644 (file)
       <add>
         Optimized access log valve, submitted by Takayuki Kaneko. (remm)
       </add>
+      <fix>
+        Fix error messages when parsing context.xml that incorrectly referred to
+        web.xml. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">