JSP 2.0 problem in Tomcat5.0.16

From: Martin (martin_at_mtchow.no-ip.com)
Date: 01/26/04


Date: Mon, 26 Jan 2004 18:38:51 +0800

I 've wrtien a simple jsp in Tomcat 5.0.16, but get error:
"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"

What's the problem on it? Thanks.

The Jsp is:
===========================================
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="h" %>
<html>
<head><title>Hello</title></head>
<c:set var="greeting" value="Hello" />
<h2>${greeting}, What's your name?</h2>
<form method="get">
    <input type="text" name="username" s ize="25">
    <p></p>
    <input type="submit" value="Submit">
    <input type="reset" value="Reset">
</form>
<c:if test="${fn:length(param.username) > 0}" >
    <h:response greeting="${greeting}" name="${param.username}"/>
</c:if>
</body>
</html>
===========================================

A tag in /WEB-INF/tags called response.tag :
===========================================
<%@ attribute name="greeting" required="true"%>
<%@ attribute name="name" required="true"%>
<h2><font color="black">${greeting}, ${name}!</font></h2>
===========================================

A dummy web.xml using 2.4 Schema:
===========================================
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
   version="2.4">
</web-app>
===========================================

Is tomcat5.0.x default setting use jsp2.0? if not how to set it to use?
Thanks, again!



Relevant Pages

  • Tomcat 5.5 - custom tag problem
    ... I have recently started to learn JSP and servlets and have installed ... Tomcat5.5 as servlet engine. ... <!DOCTYPE taglib ... type Exception report ...
    (comp.lang.java.programmer)
  • Re: Interpreting JSP code
    ... Yes I know what JSP is:) ... I have a custom taglib I use to create menus. ... void doMenu(Element e, StringBuffer s) { ... use a WAR file). ...
    (comp.lang.java.programmer)
  • Problem with JSP syntax include
    ... (Sorry if this isn't really Java-related, but I couldn't find a single newsgroup on servlets or JSP.) ... I'm going through the "Spring MVC step by step" tutorial for the Spring framework, and at the end of step 14, my Tomcat gives me an error: ... 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 ...
    (comp.lang.java.help)
  • Re: Deploying Crystal Enterprise examples with Netbeans
    ... I've tried the Business Objects web forum, ... >for learning how to display reports over the web. ... >I worked with JSP and Tomcat, and it seems to me that things have ... >These are found in the WEB-INF\lib directory, in jar files. ...
    (comp.lang.java.programmer)
  • Lucene & Java
    ... I have a small but persisting problem. ... When the code was in .jsp form it compiled fine and ran (up to a point ... seem to be able to pick up the location of a bunch of jar files - ... jar file containing the .class files that came with Lucene (e.g. ...
    (comp.lang.java.help)