Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using JSTL

 
Thirugnanam Saravanan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Head First Servlets Book (Second Edition), In Page No. 440, the steps to install JSTL 1.1 is mentioned. I followed those steps , but not able to work with JSTL.

I have included the following taglib directive in my JSP Page.



When I access the JSP, I am getting 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


My question here is:


For Using JSTL, In addition to adding JSTL related jar files in WEB-INF/lib, do we need use any tld file and do we need to put an entry for that in web.xml?
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container should recognise the URI automatically from the JAR containing the tag library. So no, you shouldn't need any extra configuration.

For some reason your container isn't recognising the JSTL JAR. Check your paths and file permissions and try again. Also try restarting your container if that causes a problem. Newer containers come installed with JSTL as standard, so also check whether you need the JAR at all. Check the server log to ensure there are no other errors reported.

I usually recommend installing these sorts of JARs into the server lib path rather than that of the individual application. That allows all applications to share the same libraries. Which server and version are you using?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition to adding JSTL related jar files in WEB-INF/lib

Which one did you put in there ?
 
Thirugnanam Saravanan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is resolved now. Thanks for your replies.

I was using Tomcat 5.5 integrated with Eclipse IDE. The problem is resolved when I added JSTL related jar files(jstl.jar and standard.jar) in WEB-INF/lib . Previously I included them only in the Java Build path --> Add External Jars ( As I will do for other Jars ).
[ December 15, 2008: Message edited by: Thirugnanam Saravanan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic