Correctly placing and referencing TLD libraries
Tomcat 5.5 documentation indicates that JAR files containing libraries should be stored in the webapps META-INF directory, per the JSP specification:
JSP.7.3.1 Identifying Tag Library Descriptors Tag library descriptor files have names that use the extension .tld , and the extension indicates a tag library descriptor file. When deployed inside a JAR file, the tag library descriptor files must be in the META-INF directory, or a subdirectory of it. When deployed directly into a web application, the tag library descriptor files must always be in the WEB-INF directory, or some subdirectory of it. The DTD for a TLD document is "http://java.sun.com/dtd/webjsptaglibrary_ 1_2.dtd"
The same requirement is also hinted in the newer Tomcat API documentation:
If the web application expects to load the library as a file, not from the classpath, the TLDs would not be loaded even if is in the classpath.
Tomcat will not autodeploy the TLD libraries that are referenced by JAR files even the TLD libraries are in the classpath. The TLD libraries have to be correctly placed, or referenced by the web application's web.xml where they can be found and loaded using the ServletContext.getResource() call.
Popular Links
Comments
Post new comment