When declaring a tabglib
like you did, the URI is used to uniquely identify each taglib in an internal registry of taglibs, much like a key is used to set/get values from a HashMap
or Hashtable
in Java.
As per Sun specifications, resolving the URIs to actual tag libraries that can be loaded/called by the application takes place in the following order:
- Check the
web.xml
file for matching taglib
tags that have the given URI in them and then follow the taglib-location
tag to actually load the TLD.
- If no match with #1 was found, recursively check the
META-INF
directory of all the JARs in the application for TLDs that contain the URI that was specified.
In you case, 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 as indicated by the org.apache.jasper.JasperException
so there must be a mismatch somewhere (between the URI and the corresponding JSTL version).
Here, my guess is that you have deployed jstl.jar
and standard.jar
from JSTL 1.0. To verifiy this, open the file META-INF/c.tld
of standard.jar
and find the uri
element. If what you can read is <uri>http://java.sun.com/jstl/core</uri>
, then you've found the issue.
So, to solve the problem, either change your taglib declaration in your JSPs like this:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
Or (and this this IMHO the preferred solution), upgrade your JSTL version to match the version expected by the JSPs, i.e. use JSTL 1.1. You can download this version from here. Then, just put the jstl.jar
and standard.jar
in your WEB-INF/lib
(if you check META-INF/c.tld
in standard.jar
, you'll see that it declares the <uri>http://java.sun.com/jsp/jstl/core</uri>
).