<%@ 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
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.
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
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.
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!
Add both javax.servlet.jsp.jstl-api-1.2.1.jar and standard-1.1.2.jar
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
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.
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
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).
Using the:
standard.jar
Resolves the problem.
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.
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.
I solved this issue. use below taglib
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
and add jstl-1.2.jar
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 .
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. :)
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"%>
Source: Stackoverflow.com