• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the URI for JSTL?

 
Shraddha Jain
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to use the <c:set> tag from the JSTL , the uri i'm providing to the taglib directive is "http://java.sun.com/jsp/jstl/core"
but this is what I get :

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
how can I fix this?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the JSP FAQ.

Not only will it give you the URI's, you can check that you're using the appropriate versions.
 
Hemant Kawale
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure you are connected to the internet.
 
Shraddha Jain
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am connected to the internet.
how can is set variables i a tagfile without using the <c:set>?
 
Stefan Evans
Bartender
Posts: 1780
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure you are connected to the internet.

You don't have to be connected to the internet.
I know it LOOKS like a location on the internet, but it's not.

The URI for a taglib is specified in the tld for the tag library.
For instance if you look in the JSTL1.1 c.tld:


The tld file is included in the META-INF directory inside standard.jar.
As long as standard.jar and jstl.jar are in the WEB-INF/lib directory of your server, it should find the tag library.

The URI could be anything. It could be http://my.tag.library if you so wished. It does NOT have to be a valid location on the internet.
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
how can I fix this?

This error would be caused by either
- not having the jar files in the WEB-INF/lib directory
- having JSTL1.0 jar files in the WEB-INF/lib directory.

Make sure
- you have the correct version of JSTL installed for your container.
- JSP1.2 = JSTL1.0
- JSP2.0 = JSTL1.1
- you are using the correct URI. For JSTL1.0 it is "http://java.sun.com/jstl/core" (note it doesn't include "/jsp" which was added for JSTL1.1)

This is all in the FAQ anyway
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic