I have an older book. It is Beginning JSP 2.0 I have tried to get the request.jsp file to work. This is on pages 42 to 44. I've installed the JSTLs to a folder I created in my /usr/local called "java". I also copied the files to the lib folder of the WEB-INF directory of the RequestHeaders directory as per the book's instructions. Here's the code for request.jsp ....
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<html>
<body>
You sent the following request headers...
<p />
<table border="1">
<tr>
<th>
Header
</th>
<th>
Value
</th>
</tr>
<c: forEach var="entry" items="$(header)">
<tr>
<td>
${entry.key}
</td>
<td>
${entry.value}
</td>
</tr>
</c:forEach>
</table>
</body>
</html>
Yet, I get this in my browser window(Firefox 1.5):
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/jstl/core_rt cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
root cause
org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/jstl/core_rt cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jsp Error(DefaultErrorHandler.java:50)
org.apache.jasper.compiler.ErrorDispatcher.dispatc h(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspErro r(ErrorDispatcher.java:114)
org.apache.jasper.compiler.TagLibraryInfoImpl.gene rateTLDLocation(TagLibraryInfoImpl.java:316)
org.apache.jasper.compiler.TagLibraryInfoImpl.<ini t>(TagLibraryInfoImpl.java:147)
org.apache.jasper.compiler.Parser.parseTaglibDirec tive(Parser.java:423)
org.apache.jasper.compiler.Parser.parseDirective(P arser.java:492)
org.apache.jasper.compiler.Parser.parseElements(Pa rser.java:1556)
org.apache.jasper.compiler.Parser.parse(Parser.jav a:126)
org.apache.jasper.compiler.ParserController.doPars e(ParserController.java:211)
org.apache.jasper.compiler.ParserController.parse( ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(C ompiler.java:155)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:295)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:276)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:264)
org.apache.jasper.JspCompilationContext.compile(
Js pCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
Please tell me what I am doing wrong? Thank you in advance!!!