Bug 55905 - Error message unhelpful when web.xml references a tld file that doesn't exist
Summary: Error message unhelpful when web.xml references a tld file that doesn't exist
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 7.0.47
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-18 14:30 UTC by Anthony Gerrard
Modified: 2013-12-18 19:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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