|
tommyc7 (Programmer) |
25 Feb 10 15:49 |
I am a Java developer but am new to using the JSTL in JSPs. I am working through a book and using the supplied code, but keep getting the same error. I've googled this, but can't seem to find anything wrong with the code. Here is a snippet of the tutorial code: CODE<!--Use taglib directive to include JSTL core and XML tags--> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %> <!--Parse newslist.xml file and store result in newslist variable in application scope--> <c:if test="${empty applicationScope.newslist}" > <c:import url="http://localhost:8080/news/xml/newslist.xml" var="xml" /> <x:parse doc="${xml}" var="newslist" scope="application" /> </c:if> <!--Retrieve date element value for each news element and store in tempdate variable in request scope--> <x:forEach var="heading" select="$newslist/newslist/*"> <c:set var="tempdate" scope="request"> <x:out select="$heading/date"/> </c:set> and here is the start of the exception: CODEorg.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 org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) The book didn't indicate that web.xml needed to be changed. I'm using Tomcat 5.5. I've try putting a copy of the jstl jar in my classpath, but that didn't help. I'm sure being new I'm missing something small. Any ideas? Thanks, Tom |
|