Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I've learned more from your forums in 3 days than 3 months at school and on the job combined..."

Geography

Where in the world do Tek-Tips members come from?
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:

CODE

org.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
Diancecht (Programmer)
26 Feb 10 3:52
Take a look at this

Cheers,
Dian

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close