Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL Example

 
Nikhil Jain
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,
I was just trying to use JSTL in my code. I wrote the following code from HFS. Prior to this I copied the jstl.jar to my web apps lib folder. But I get the following error.
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

Do I need to put something in web.xml?
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<body>
<table>
<c:forEach var="movie" items="${movieList}" >
<tr>
<td>${movie}</td>
</tr>
</c:forEach>
</table>
</body>
</html>
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
don't forget to put standard.jar also in your lib directory.
 
Nikhil Jain
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wow! that was quick answer, anyways, it worked. Thanks a lot. But the book did not mention anything about standard.jar. What is it for?

thanks once again,
shashank
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's an implementation of JSTL.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic