File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes deploying jstl problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "deploying jstl problem" Watch "deploying jstl problem" New topic
Author

deploying jstl problem

Brijesh shah
Ranch Hand

Joined: Mar 16, 2007
Posts: 90
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

Joined: Jun 18, 2007
Posts: 383
I ran it, it works & gives output:

matrix
goal
Departed


SCJP-1.5<br />SCWCD-1.4
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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


[My Blog]
All roads lead to JavaRanch
Brijesh shah
Ranch Hand

Joined: Mar 16, 2007
Posts: 90
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

Joined: Feb 05, 2003
Posts: 4727

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.


A good workman is known by his tools.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: deploying jstl problem