How to resolve : Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"

JavaJspJstl

Java Problem Overview


<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.library.controller.*"%>
<%@ page import="com.library.dao.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.Date" %>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Return Page</title>
</head>
<body bgcolor="#aabcde">
<div align="right"><a href="Login.jsp">Logout</a></div>
<table align="center" border="2" cellspacing="3" cellpadding="3">
<tr><th>BookID</th><th>BookName</th><th>Issuedate</th><th>returndate</th></tr>
<c:forEach var="element" items="${list}">
    <tr>
        <td>${element.getBookid}</td><td>${element.getBookname()}</td>  
        <td>${element.getIssuedate()}</td><td>${element.getReturndate()}</td>
    </tr>
</c:forEach>

The Eclipse IDE is showing red underline and when I focus it the tag is : can not find the library descriptor for http://java.sun.com/jsp/jstl/core

Java Solutions


Solution 1 - Java

I know this thread is a year old now but having experienced the same problem I managed to solve the problem by setting a target server for my project.

i.e. right-click on your project and select 'Properties' -> 'Targeted Runtimes' and select the server you going to run your web app on (Tomcat 6 or 7).

Solution 2 - Java

I also use this

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

but I don't get any error.

Did you include the jstl.jar in your library? If not maybe this causing the problem. And also the 'tld' folder do you have it? And how about your web.xml did you map it?

Have a look on the info about jstl for other information.

Solution 3 - Java

As @ace mentioned you will need the jstl.jar in your project, so if you are using maven, you could add this dependency:

<dependency>
    <groupId>jstl</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>
        

Source: http://mvnrepository.com/artifact/jstl/jstl/

Hope it helps.

EDIT: Most of servers already have this dependency, if you add it using maven it may cause version conflicts (like Method/ClassNotFoundException) if you don't configure the server well, so it's better set a target server for your project, as @willix mentioned.

Solution 4 - Java

Try to add like this:

<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>

instead of having

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

Solution 5 - Java

Add both javax.servlet.jsp.jstl-api-1.2.1.jar and standard-1.1.2.jar

Solution 6 - Java

After a couple of hit and trial I use this. This works for me.

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

WARNING: As BalusC correctly mentioned, this works for JSTL 1.0.

Solution 7 - Java

You are probably targeting a server without built-in JSTL support (e.g. some version of Tomcat.) You will need to provision your own JSTL tag library.

Solution 8 - Java

paste below two jar in your /WEB-INF/lib folder and then go to project properties and go to add jar and select these two jars then click Ok, Ok

standard.jar, jstl-1.0.2.jar

Solution 9 - Java

I tried "validating" de *.jsp and *.xml files in eclipse with the validate tool.

"right click on directory/file ->- validate" and it worked!

Using eclipse juno.

Hope it helps!

Solution 10 - Java

Using the:

> standard.jar

Resolves the problem.

Solution 11 - Java

It has nothing to do about <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>.

Just go to project and right click then project menu -> Clean the project error will definitely remove and update maven .

Solution 12 - Java

You have to write as

<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>

Make sure you have jstl-1.0 & standard.jar BOTH files are placed in a classpath

Solution 13 - Java

It will work perfectly when you will place the two required jar files under /WEB-INF/lib folder i.e. jstl-1.2.jar and javax.servlet.jsp under /WEB-INF/lib folder.

Hope it helps. :)

Solution 14 - Java

I solved this issue. use below taglib

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

and add jstl-1.2.jar

Solution 15 - Java

This should work

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

and moreover please let us know why are you importing all these class

<%@ page import="com.library.controller.*"%> 
<%@ page import="com.library.dao.*" %> 
<%@ page import="java.util.*" %> 
<%@ page import="java.lang.*" %> 
<%@ page import="java.util.Date" %>

We don't need to include java.lang as it is the default package.

Solution 16 - Java

I will throw one more solution into the mix. I downloaded a sample app and it was crimping only on this taglib. Turns out it didn't care for the single quotes around the attributes.

<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core' %>

Once I changed those and made sure jstl.jar was in the web app, i was good to go.

Solution 17 - Java

I added jstl jar in a library and added it to build path and deployment assembly but it dint worked. then i simply copied my jstl jar into lib folder inside webcontent, it worked. in eclipse lib folder in included to deployment assembly by default

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSamarth2011View Question on Stackoverflow
Solution 1 - JavawillixView Answer on Stackoverflow
Solution 2 - JavaaceView Answer on Stackoverflow
Solution 3 - JavarvazquezglezView Answer on Stackoverflow
Solution 4 - JavaMuthuView Answer on Stackoverflow
Solution 5 - JavaKarthikeyan KView Answer on Stackoverflow
Solution 6 - JavaNishantView Answer on Stackoverflow
Solution 7 - JavaMcDowellView Answer on Stackoverflow
Solution 8 - JavaAntesh SharmaView Answer on Stackoverflow
Solution 9 - JavaWalterViView Answer on Stackoverflow
Solution 10 - Javarachakonda srinivasView Answer on Stackoverflow
Solution 11 - JavaBuddheshwar OjharView Answer on Stackoverflow
Solution 12 - JavaSaurabh NaikView Answer on Stackoverflow
Solution 13 - JavaJitesh BeniwalView Answer on Stackoverflow
Solution 14 - JavaBhagwan SinghView Answer on Stackoverflow
Solution 15 - JavaKrishnaView Answer on Stackoverflow
Solution 16 - JavaDan DoyonView Answer on Stackoverflow
Solution 17 - JavaRavi SahuView Answer on Stackoverflow