Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

deploying jstl problem

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ran it, it works & gives output:

matrix
goal
Departed
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
A teeny tiny vulgar attempt to get you to buy our stuff
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic