• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSTL- throwing exceptions, cannot resolve

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to use jstl-1.0. A very basic jsp page is throwing following exceptions. Please look at the jsp page below the exceptions. Kindly note that I am using tomcat 4.1 and jstl.jar & standard.jar is present in the lib folder. I even tried to use the jstl-examples shipped with Java Web Services Developer Pack (Java WSDP). I am getting the same exception. Can anybody help me resolving this problem.

org.apache.jasper.JasperException: null(-1,-1) This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:417)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)
at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:159)......................

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<html>
<head>
<title>Simple Example</title>
</head>
<body>
<c:set var="browser" value="${header['User-Agent']}"/>
<c ut value="${browser}"/>
</body>
</html>
 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My first thought is that you dont have the taglib defined in the web.xml file or it is incorrect.



The uri is what you use to identify the taglib. It can be anything as long as you use the same thing in your JSP page taglib declaration.
The location is the path from the doc root to your tld file for the taglib.
The is pretty much the last item in your web.xml file. You may want to refer to the tomcat docs for more info on placement.

Hope this helps.
 
Swapan Mazumdar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chris Stehno:
...
...


Chris,

I very much thought of that but I just managed to resolve that issue after downloading jakarta-taglibs-standard-1.1.2 and used the examples from standar-examples with tomcat5.
Surprisingly, its web.xml has basic elements like <description> and <welcome-file-list>. I can't see any <taglib> entries. But all the examples work so well. But it has jstl-examples.tld file in tlds folder which either has no such entries.

I am so much puzzled to base my knowledge on something specific.
BTW how does
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
and
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> can affect in normal functioning.
Kindly reply,
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic