Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
| Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 4th, 2007, 04:19 AM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default where to install the JSTLs, how to make them work

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!!!

  #2 (permalink)  
Old March 23rd, 2007, 07:51 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

You have to update your web.xml and add a <taglib></taglib> element which point to the tld file in the lib folder of your web-inf directory. Refer the following url for the syntax

http://edocs.bea.com/wls/docs61/weba...l.html#1017621

Regards,
Rakesh

- Rakesh
  #3 (permalink)  
Old August 9th, 2007, 03:39 AM
Registered User
 
Join Date: Aug 2007
Location: Kolkata, West Bengal, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anubhavharlalka Send a message via Yahoo to anubhavharlalka
Default

You have to download the JSTL libraries from the Tomcat website and put it in the lib directory of your Tomcat installation.

Please send me your email id and i'll send it over to you. It was the same problem I faced.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting common dialog to work (re-install) Ragtime Access VBA 0 November 2nd, 2007 10:59 PM
How do you make CD auto install twalmac C# 0 July 7th, 2006 08:45 AM
how to make it work? ashokparchuri ADO.NET 2 March 4th, 2005 07:00 AM
Cannot make site work wenlanli BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 3rd, 2004 11:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.