If TLDs are defined in web.xml, duplicates are expected so only log at debug
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 20 Jul 2009 11:08:24 +0000 (11:08 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 20 Jul 2009 11:08:24 +0000 (11:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@795767 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/TldRuleSet.java

index b24218e..a359698 100644 (file)
@@ -115,8 +115,17 @@ final class TaglibUriRule extends Rule {
         if (tldConfig.isKnownTaglibUri(text)) {
             // Already seen this URI
             duplicateUri = true;
-            digester.getLogger().info(
-                    "TLD skipped. URI: " + text + " is already defined");
+            // This is expected if the URI was defined in web.xml
+            // Log message at debug in this case
+            if (tldConfig.getContext().findTaglib(text) == null) {
+                digester.getLogger().info(
+                        "TLD skipped. URI: " + text + " is already defined");
+            } else {
+                if (digester.getLogger().isDebugEnabled()) {
+                    digester.getLogger().debug(
+                            "TLD skipped. URI: " + text + " is already defined");
+                }
+            }
         } else {
             // New URI. Add it to known list and carry on
             duplicateUri = false;