Struts - struts-taglib.jar not found
Question
I am new to Struts
. I downloaded Struts2
from its website. Now I want to refer struts-html.tld
file in one of my JSP
files.
But when I looked for struts-taglib.jar
file in the downloaded struts, I didn't find it.
Solution
Download the full distribution - it has everything included.
OTHER TIPS
There exists only one tag library in struts2. It is completely different compared to struts1. The tag library is struts-tags.tld which can be found in META-INF folder in struts-core-.jar.
All the jar files in struts2 are located in:
..\struts-2.3.15\lib
However, I am not sure if there is such thing as struts-taglib.jar
You might be thinking of:
<%@ taglib prefix="s" uri="/struts-tags"%>
required jar for that is: struts2-core-2.x.x.jar
Download from the given link http://struts.apache.org/download.cgi#struts23163 In this link go to final distribution.
Please download the full distribution from the struts website, and build a project out of their showcase.war if you download the latest version which is 2.5.x or struts-blank.war if you download 2.3.x. This way you will have all the required libraries in your project. I have had all kinds of issues trying to figure out jar file.
I had the same problem. I resolved it by downloading the struts-taglib-1.3.5
jar separately and put it under /WEB-INF/lib
where all my other jar files are.
After that just include the line : <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
in your jsp and it should work.
Or
You could include : <%@ taglib prefix="ss" uri="/struts-tags" %>
Both of these methods worked for me.