Reputation: 2599
I'm using maven3 and tomcat7 , i want to use JSTL in my jsp page so i added this taglib:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
the problem that i get this error message :cannot find the tag library descriptor this is the dependencies added : javax.servlet jstl 1.1.1
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
i tried this taglib but the same problem persist :
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
Have you an idea please
Upvotes: 3
Views: 2459
Reputation: 109
Hope this answer will help new one's searching on the same topic.. as I did and did not find any answers.. finally I fixed it ..
There are few steps to follow.. For Tomcat 7 and maven , jstl 1.2 & standard 1.1.0 is compatible
Update pom.xml file to
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.0</version>
</dependency>
Update web.xml file to
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns /j2ee/web-app_2_4.xsd">
This Works!
Upvotes: 1
Reputation: 1081
You need two different jar files for tags to work. You have listed standard as a dependency, but you will also need to add a dependency for JSTL.
Upvotes: 1