Advertisement
Advertisement


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


Question

<%@ 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

2011/05/13
1
93
5/13/2011 12:24:19 PM

Accepted Answer

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.

2017/05/23
62
5/23/2017 12:32:29 PM


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.

2014/12/29

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"%>
2013/03/10

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

2014/08/21

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.

2013/06/17

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.

2011/05/13

Source: https://stackoverflow.com/questions/5987908
Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Email: [email protected]