DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=38476>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38476 Summary: org.apache.catalina.startup.TldConfig doesn't handle missing tlds well Product: Tomcat 5 Version: 5.5.14 Platform: Other OS/Version: other Status: NEW Severity: minor Priority: P2 Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Missing tlds are not handled properly in TldConfig.tldScanTld(). Instead of throwing an exception for the missing resource, an empty InputStream is created and so an exception is generated by the xml parser there is a bad catch around line 536: try { inputSource = new InputSource( context.getServletContext().getResourceAsStream(resourcePath)); if (inputSource == null) { throw new IllegalArgumentException (sm.getString("contextConfig.tldResourcePath", resourcePath)); } tldScanStream(inputSource); ==== as you can see "if (inputSource == null)" can't never be executed because of the previous new InputSource(...) line. Should be fixed with: InputStream stream = context.getServletContext().getResourceAsStream(resourcePath); if (stream == null) { throw new IllegalArgumentException (sm.getString("contextConfig.tldResourcePath", resourcePath)); } inputSource = new InputSource(stream ); tldScanStream(inputSource); -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]