Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JSTL Newbie - What's causing this error?

Status
Not open for further replies.

tommyc7

Programmer
Feb 3, 2007
33
US
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="[URL unfurl="true"]http://java.sun.com/jsp/jstl/core"[/URL]
    prefix="c" %>
<%@ taglib uri="[URL unfurl="true"]http://java.sun.com/jsp/jstl/xml"[/URL]
    prefix="x" %>
<!--Parse newslist.xml file and store result in newslist variable in application scope-->
<c:if test="${empty applicationScope.newslist}" >
  <c:import url="[URL unfurl="true"]http://localhost:8080/news/xml/newslist.xml"[/URL] 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:

Code:
org.apache.jasper.JasperException: The absolute uri: [URL unfurl="true"]http://java.sun.com/jsp/jstl/core[/URL] 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top