Improve error handling in TLD processing and handle the case when there is no web.xml
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 10 Oct 2010 18:09:43 +0000 (18:09 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 10 Oct 2010 18:09:43 +0000 (18:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1006329 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/compiler/TldLocationsCache.java
webapps/docs/changelog.xml

index 60cc793..580d567 100644 (file)
@@ -201,7 +201,7 @@ public class TldLocationsCache {
             initialized = true;
         } catch (Exception ex) {
             throw new JasperException(Localizer.getMessage(
-                    "jsp.error.internal.tldinit", ex.getMessage()));
+                    "jsp.error.internal.tldinit", ex.getMessage()), ex);
         }
     }
 
@@ -233,7 +233,10 @@ public class TldLocationsCache {
         WebXml webXml = null;
         try {
             webXml = new WebXml(ctxt);
-            
+            if (webXml.getInputSource() == null) {
+                return;
+            }
+
             // Parse the web application deployment descriptor
             TreeNode webtld = null;
             webtld = new ParserUtils().parseXMLDocument(webXml.getSystemId(),
index 33b1767..011d76d 100644 (file)
         Correctly handle the setting of primitve bean values via expression
         language. (markt)
       </fix>
+      <fix>
+        Don&apos;t swallow exceptions when processing TLD files and handle the
+        case when there is no web.xml file. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">