Author: markt Date: Sun Oct 10 18:09:43 2010 New Revision: 1006329 URL: http://svn.apache.org/viewvc?rev=1006329&view=rev Log: Improve error handling in TLD processing and handle the case when there is no web.xml
Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java?rev=1006329&r1=1006328&r2=1006329&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java Sun Oct 10 18:09:43 2010 @@ -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(), Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1006329&r1=1006328&r2=1006329&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Sun Oct 10 18:09:43 2010 @@ -152,6 +152,10 @@ Correctly handle the setting of primitve bean values via expression language. (markt) </fix> + <fix> + Don'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"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org