Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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!!!

Reply With Quote
  #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
Reply With Quote
  #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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:57 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.