• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using JSTL

 
Stella Kim
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to test some JSTL.
I installed "jstl.jar" in my web app's WEB-INF/lib directory under the Tomcat5.
When I invoked the JSP file containing <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>,
I am receiving an JsperException saying that "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"

what's the problem ?
Please..
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think your are using a pre - jsp2.0 spec
because, with the new jsp2.0 you dont need to tell the container where
your jstl ( that has all the tld inside it ) is located. it automatically builds a map of the uri in each tld, and it location so that whenever a jsp invokes a tag, the container knows where to look for the tld ( based on the uri used in the jsp ). so the map has uri:key and location of tld:value.
But this happens only if you keep the tld in standard places
1. WEB-INF/
2. WEB-INF/sub_dir

3.META-INF/
4.META-INF/sub_dir

3 and 4 hold true if the tld is deployed in a jar. In your case, 3 and 4 apply. just try to open the jstl.jar and make sure it contains a folder called META-INF and see that the c.tld is in any of locations as said by 3 and four. when you do so, you find that c.tld is not present in jstl.jar
c.tld is in standard.jar

Thus standard.jar is used for all your c:XXX needs

so copy standard.jar in we-inf/lib

this should solve your problem

lt me know the progress
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did it solve the query ?
 
Stella Kim
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Niranjan,
Thanks for your comments.
Last night, i didn't try...and I just woke up..
I will try and let you know..
thanks
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everything is explained in the FAQ :
http://faq.javaranch.com/view?JstlTagLibDefinitions
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic