Solved

problem with core_rt

Posted on 2006-06-28
11
1,233 Views
Last Modified: 2013-11-24
Hi all,

Please help ...

The following is my setting -

Path: Tommcat5.5\webapps\test\WEB-INF
test folder contains WEB-INF and request.jsp
WEB-INF contains classes, lib, tld folders, and web.xml.

classes folder is empty.
lib folder contains jstl.jar, standard.jar, ...

tld folder contains c.tld, c-rt.tld, fmt.tld, fmt-rt.tld, sql.tld, sql-rt.tld, x.tld, and x-rt.tld

request.jsp:

<%@ taglib uri="http://java.sun.com/jst1/core_rt" prefix="c_rt" >
<html>
    <body>
        You sent the following request headers:
        <br />
        <table border="1">
         <tr><th>Header</th><th>Value</th></tr>
         <c:forEach var="entry" items="${header}">
         <tr>
         <td>${entry.key}</td>
         </tr>
         </c:forEach>
        </table>
     </body>
</html>
---------------------------------------------------------------------------------------------------------------------------------------

web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>

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

<taglib>
      <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
      <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>

<taglib>
      <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
      <taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
</taglib>

<taglib>
      <taglib-uri>http://java.sun.com/jstl/xml</taglib-uri>
      <taglib-location>/WEB-INF/tld/x.tld</taglib-location>
</taglib>

<taglib>
      <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
      <taglib-location>/WEB-INF/tld/sql.tld</taglib-location>
</taglib>

</web-app>
-------------------------------------------------------------------------------------------------------------------------------
After entered http://localhost:8080/test/request.jsp at the URL and pushed enter, the error message shown as below -

-------------------------------------------------------------------------------
HTTP Status 500 -

--------------------------------------------------------------------------------

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/jst1/core_rt cannot be resolved in either web.xml or the jar files deployed with this application
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
=========================================================================

:(


0
Comment
Question by:guochu
  • 2
  • 2
  • 2
  • +3
11 Comments
 
LVL 16

Expert Comment

by:suprapto45
Comment Utility
Hi,

You do not have c_rt in your lib, do you?
<%@ taglib uri="http://java.sun.com/jst1/core_rt" prefix="c_rt" >

instead, you have c JSTL in your lib so you can change it into
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" >

David
0
 
LVL 16

Accepted Solution

by:
suprapto45 earned 41 total points
Comment Utility
If you want to use c_rt, you need to add it to your web.xml first.

David
0
 
LVL 5

Assisted Solution

by:gksinghiet
gksinghiet earned 41 total points
Comment Utility
In request.jsp use
<%@ taglib uri="http://java.sun.com/jst1/core" prefix="c" >
instead of
<%@ taglib uri="http://java.sun.com/jst1/core_rt" prefix="c_rt" >
in your JSP.
uri should be the one which is deployed in web.xml, as use deployed core tags with uri 'http://java.sun.com/jst1/core'
you should use the same URI
0
 
LVL 14

Assisted Solution

by:boonleng
boonleng earned 41 total points
Comment Utility
Typo error:
<%@ taglib uri="http://java.sun.com/jst1/core_rt" prefix="c_rt" >

should be http://java.sun.com/jstl/core_rt, is 'l' not '1'.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 27

Expert Comment

by:rrz
Comment Utility
Which version of the jars did you download ?  Why not get 1.1.2  ?
0
 

Author Comment

by:guochu
Comment Utility
Hi all,

Thanks for replying my question.

>>>>  You do not have c_rt in your lib, do you?
>>>>  <%@ taglib uri="http://java.sun.com/jst1/core_rt" prefix="c_rt" >

I have these files c.tld, c-rt.tld, fmt.tld, fmt-rt.tld, sql.tld, sql-rt.tld, x.tld, and x-rt.tld in the tld folder.


>>>>    instead, you have c JSTL in your lib so you can change it into
>>>>   <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" >

I have tried it, but didn't work.


>>>>  If you want to use c_rt, you need to add it to your web.xml first.

Are you refering to core_rt or c-rt? I don't have core_rt.tld inside the tld folder. Where can I download it? If I have this core_rt, then I need to add it to web.xml, right?

Am my syntax rigjt?
<taglib>
      <taglib-uri>http://java.sun.com/jstl/core_rt</taglib-uri>
      <taglib-location>/WEB-INF/tld/core_rt.tld</taglib-location>
</taglib>

or
<taglib>
      <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
      <taglib-location>/WEB-INF/tld/core_rt.tld</taglib-location>
</taglib>

>>>>  In request.jsp use
>>>>  <%@ taglib uri="http://java.sun.com/jst1/core" prefix="c" >
>>>>  instead of
>>>>  <%@ taglib uri="http://java.sun.com/jst1/core_rt" prefix="c_rt" >
>>>>  in your JSP.
>>>>  uri should be the one which is deployed in web.xml, as use deployed core tags with
>>>>  uri 'http://java.sun.com/jst1/core'
>>>>  you should use the same URI

I have tried <%@ taglib uri="http://java.sun.com/jst1/core" prefix="c" >, but didn't work.

Can anyone give me one working version?

Thanks for reading :)

0
 

Author Comment

by:guochu
Comment Utility
>>>   Which version of the jars did you download ?  Why not get 1.1.2  ?

version 1.0
0
 
LVL 27

Assisted Solution

by:rrz
rrz earned 41 total points
Comment Utility
Why not get 1.1.2  ?  
It is easier. The tlds are in the jars and you don't have to worry about them.
0
 
LVL 4

Assisted Solution

by:evnafets
evnafets earned 41 total points
Comment Utility
In fact if you have a JSP2.0 container (like Tomcat 5) and are using the version 2.4 web.xml (which you are) you CAN'T use JSTL1.0 - it is incompatible.

My suggestions
- remove all that taglib crap from your web.xml file.
- delete all the tld files.
- download JSTL1.1 (http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi)
- import with the following urls in all your JSP pages: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  - note the addition of the "/jsp" in there.
  - also note that it is JSTL, not JST1 (it is the letter 'l', not the number '1' which you have in some of the code above)

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now