Solved

problem with core_rt

Posted on 2006-06-28
11
1,234 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
ID: 16999014
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
ID: 16999024
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
ID: 16999427
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
ID: 17000860
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 27

Expert Comment

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

Author Comment

by:guochu
ID: 17003065
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
ID: 17003071
>>>   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
ID: 17006042
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
ID: 17055776
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
wordsFront challenge 8 84
Books that can get me started on JAVA 2 80
strDist challenge 35 97
word0 challenge 3 78
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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.

910 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

21 Experts available now in Live!

Get 1:1 Help Now