I have a web application that is being migrated from Tomcat 5.5.35 to Tomcat 7.0.39. Presently, there are several custom taglibs, each defined in its own tld
file. Here is one example:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>customTag</short-name>
<uri>http://www.something.com/util/customTag-db-taglib</uri>
<description>
Database tag library for Util
</description>
<tag>
<name>useBean</name>
<tag-class>com.mx.releasemgr.tags.db.UseBeanTag</tag-class>
<tei-class>com.mx.releasemgr.tags.db.UseBeanTEI</tei-class>
<body-content>EMPTY</body-content>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>oid</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>oidParameter</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>type</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
...
</taglib>
There is exactly ONE copy of this tld file in the WEB-INF
folder. It was never put into a jar
file.
The web.xml
looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
...
<jsp-config>
<taglib>
<taglib-uri>customTag</taglib-uri>
<taglib-location>/WEB-INF/customTag.tld</taglib-location>
</taglib>
</jsp-config>
...
This error is showing up in the catalina.out
Apr 11, 2013 3:50:08 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://www.mx.com/releasemgr/releasemgr-db-taglib is already defined
The taglib is imported like so:
<%@ taglib uri="customTag" prefix="db" %>
I have looked at this question but it does not seem to apply. I have added the <jsp-config>
, it doesn't help. Am I calling the taglib wrong? Is the URI parameter correct? Any help is appreciated.