aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes using JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "using JSTL" Watch "using JSTL" New topic
Author

using JSTL

Thirugnanam Saravanan
Ranch Hand

Joined: Dec 13, 2007
Posts: 81
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?


Saravanan
SCJP 5.0(98%), SCWCD 5.0 (100%), OCA
Charles Lyons
Author
Ranch Hand

Joined: Mar 27, 2003
Posts: 836
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?


Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / Amazon Amazon UK )
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

In addition to adding JSTL related jar files in WEB-INF/lib

Which one did you put in there ?


[My Blog]
All roads lead to JavaRanch
Thirugnanam Saravanan
Ranch Hand

Joined: Dec 13, 2007
Posts: 81
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using JSTL