By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 1,905 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

JSP 2.0 problem in Tomcat5.0.16

P: n/a
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!
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.