From: markt Date: Sun, 10 Oct 2010 18:09:43 +0000 (+0000) Subject: Improve error handling in TLD processing and handle the case when there is no web.xml X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d8f906de2e6ebec1bbb58da103c2a8a4ae3258bf;p=tomcat7.0 Improve error handling in TLD processing and handle the case when there is no web.xml git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1006329 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/compiler/TldLocationsCache.java b/java/org/apache/jasper/compiler/TldLocationsCache.java index 60cc79362..580d567a6 100644 --- a/java/org/apache/jasper/compiler/TldLocationsCache.java +++ b/java/org/apache/jasper/compiler/TldLocationsCache.java @@ -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(), diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 33b176722..011d76de9 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -152,6 +152,10 @@ Correctly handle the setting of primitve bean values via expression language. (markt) + + Don't swallow exceptions when processing TLD files and handle the + case when there is no web.xml file. (markt) +