Vani
Vani

Reputation: 11

Where is Displaytag.tld(not jar)

I am not seeing the .tld file in my download folder. I only see JAR files. What I am missing?

My problem is that, I can't refer like this in my JSP:

<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>

I get some error. Hence want to download .tld and put it under local WEB-INF folder and then change my JSP like this:

<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %>

Upvotes: 1

Views: 8988

Answers (3)

venkateswararao
venkateswararao

Reputation: 11

Download displaytag jar and extract this jar file first. Then, find the METS-INF folder . Inside this META-INF folder, you will find the displaytag.tld file.

Upvotes: 1

Vishal Sharma
Vishal Sharma

Reputation: 2803

you will have to make entry in your web.xml file for your local displaytag.tld file..

<jsp-config>
<taglib>
<taglib-uri>
any uri but this must be same as in jsp's uri one
</taglib-uri>
<taglib-location>
location of tld file
</taglib-location>
</taglib>
</jsp-config>

Upvotes: 0

BalusC
BalusC

Reputation: 1109665

You don't need the loose TLD. It's already inside the JAR file. Just put the downloaded JAR file in /WEB-INF/lib. That's all. No, not in /WEB-INF, this is not covered by the default classpath.

You only need to ensure that the taglib URI is correct. Else it will indeed complain about that. The correct one is usually to be found in the documentation of the library in question.

Upvotes: 1

Related Questions