Sun JSTL taglib declaration fails with "Can not find the tag library descriptor" [duplicate]
To resolve this issue:
The
jstl jar
should be in your classpath. If you are using maven, add a dependency to jstl in yourpom.xml
using the snippet provided here. If you are not using maven, download the jstl jar from here and deploy it into yourWEB-INF/lib
.Make sure you have the following taglib directive at the top of your
jsp
:<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
Just check our own JSTL wiki page for the proper download links and crystal clear installation instructions.
Put your mouse above the [jstl]
tag which you put on the question yourself until a black box shows up and click therein the info link.
Then scroll a bit down to JSTL versions information until you find download link to JSTL 1.2 (or 1.2.1).
Finally just drop exactly that file in webapp's /WEB-INF/lib
.
This way the taglib declaration must not give any errors anymore and the JSTL tags and functions should just work.
I just want to share my experience. I have same problem about jstl using maven. I resolved it by adding two dependency.
<dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency>