0
votes

when I want use taglib in JSP like:

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

this exceptionError is shown:

message : 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

description : The server encountered an internal error that prevented it from fulfilling this request.

why this happen? How can I solve this problem?

1

1 Answers

0
votes

It looks like you do not have the JSTL (JavaStandardTagLibrary) within your classpath.

See this answer on how to add it here:

Sun JSTL taglib declaration fails with "Can not find the tag library descriptor"

Some Background:

Basically, the url "http://java.sun.com/jsp/jstl/core" tells the container to look up some tag lib implementation registering itself for this URI. The specific URL you try to use is the standard JSTL URI. The container will search within the classpath for a *.tld (Tag Lib Declaration), wich is an XML file telling the container where to find the resources for executing the code for the tag you are using. The JSTL jar contains both *.tld file and implementation, so this is waht you'l need.