Bug 55905

Summary: Error message unhelpful when web.xml references a tld file that doesn't exist
Product: Tomcat 7 Reporter: Anthony Gerrard <anthonygerrard+apache.org>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 7.0.47   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Anthony Gerrard 2013-12-18 14:30:15 UTC
In your web-application web.xml add a taglib element but get the taglib-location wrong or forgot to include *.tld when packaging your archive

  <jsp-config>
    <taglib>
        <taglib-uri>http://www.example.org/mytaglib</taglib-uri>
        <taglib-location>/WEB-INF/wrong.tld</taglib-location>
    </taglib>
  </jsp-config>

Start you web-app.

Expected:

Get a helpful message like

WARN  org.apache.catalina.startup.TldConfig - Failed to process TLD with path [/WEB-INF/wrong.tld] and URI [http://www.example.org/mytaglib]
java.io.FileNotFoundException: /WEB-INF/wrong.tld
...

Actual:

WARN  org.apache.catalina.startup.TldConfig - Failed to process TLD with path [http://www.example.org/mytaglib] and URI [/WEB-INF/wrong.tld]
java.net.MalformedURLException: null
...

Note also that with the current error message the path is labelled at the URI and vice versa, adding to the confusion.
Comment 1 Violeta Georgieva 2013-12-18 19:53:17 UTC
Thanks for the report.
Fixed in trunk and 7.0.x and will be included in 8.0.0-RC10 and 7.0.50 onwards.

Regards
Violeta