Question

I am developing a Struts based web application. I am new to Struts. I want to use struts-html.tld taglib, provided by struts, in my jsp pages.

When I searched on net, I came to know that prior to Struts 1.2.9, we need to locate the .tld files manually.

But now these .tld files are packed in .jar files and we need to just use those jar files as any other jar file in our project.

Q1. So my question is in Which jar file these .tld files are located. I came to know from a Javaranch answer that these .tld files are packed into struts-taglib.jar file. I downloaded the full struts libraries but didn't find that jar file.

Was it helpful?

Solution

It's not clear which version of Struts you're using but the TLD you are referring to is a Struts 1 TLD.

In Struts 1.3.10, it is bundled in struts-taglib-1.3.10.jar/META-INF/tld/struts-html.tld which is distributed in struts-1.3.10-lib.zip. In Struts 1.2.9, you'll find it in the root of struts-1.2.9-lib.zip.

Just in case, note that Struts 2 uses a completely different tag library than Struts 1 and there is only one taglib instead of several. The corresponding TLD is located in struts2-core-2.1.8.1.jar/META-INF/struts-tags.tld.

OTHER TIPS

struts2-core-2.2.1.1.jar will contain the TLD file at the following location struts2-core-2.2.1.1.jar/META-INF/struts-tags.tld

I looked in one of our projects using Struts. I can see this tld file: struts2-core-j4-2.0.11.jar\META-INF\struts-tags.tld

Note you can search through Jar files using Windows search. See here if you're having issues searching.

Download the Full Distribution of Struts and find the struts-blank.war in the archive. Extract the struts-blank.war and under the WEB-INF folder, copy all the .tld files into your WEB-INF folder.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top