• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deploying jstl problem

 
Brijesh shah
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello;

The code is:
<%@page contentType="text/html"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head><title>JSP Page</title></head>
<body>

<%
String[] movieList = {"matrix","goal","Departed"};
request.setAttribute("movieList",movieList);
%>
<table>
<c:forEach items = "${movieList}" var = "movie">
<tr><td>${movie}</td></tr>
</c:forEach>
</table>
</body>
</html>

While running this above simple <c:forEach> example i am getting an error is:
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

I have not configured anything for this in web.xml.

Let me know the solution for this.

Regards;
Brijesh
 
dolly shah
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran it, it works & gives output:

matrix
goal
Departed
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brijesh,
Did you put the necessary jar files in your lib directory ? standard.jar and jstl.jar ? And did you configure web.xml properly ?
Please read this FAQ and follow each step.

I ran it, it works & gives output

That was helpful
 
Brijesh shah
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Christophe Verre:
Brijesh,
Did you put the necessary jar files in your lib directory ? standard.jar and jstl.jar ? And did you configure web.xml properly ?
Please read this FAQ and follow each step.


That was helpful


Thanks Christophe,

I got the problem..Actually i put the jar file on \Tomcat 5.5\webapps\jsp-examples\WEB-INF\lib as given in HFSJ book which was not working...After your reply i tried the same thing pasting in my webapps lib directory; It's working now.

Regards,
Brijesh.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Brijesh shah:
I got the problem..Actually i put the jar file on \Tomcat 5.5\webapps\jsp-examples\WEB-INF\lib as given in HFSJ book which was not working...After your reply i tried the same thing pasting in my webapps lib directory; It's working now.

On page 434 it says:
Copy the files from the Tomcat examples at:
webapps/jsp-examples/WEB-INF/lib/jstl.jar
webapps/jsp-examples/WEB-INF/lib/standard.jar

And place it in your own web app's WEB-INF/lib directory.

Was there a different spot in the book that said something to mislead you, Brijesh? Your input will be helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic