guochu
asked on
problem with core_rt
Hi all,
Please help ...
The following is my setting -
Path: Tommcat5.5\webapps\test\WE B-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>Val ue</th></t r>
<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-lo cation>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/ tld/fmt.tl d</taglib- location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/xml</taglib-uri>
<taglib-location>/WEB-INF/ tld/x.tld< /taglib-lo cation>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
<taglib-location>/WEB-INF/ tld/sql.tl d</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.JasperEx ception: 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. JspServlet Wrapper.ha ndleJspExc eption(Jsp ServletWra pper.java: 510)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 75)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:314)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:264)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
========================== ========== ========== ========== ========== =======
:(
Please help ...
The following is my setting -
Path: Tommcat5.5\webapps\test\WE
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>Val
<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/
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/xml</taglib-uri>
<taglib-location>/WEB-INF/
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
<taglib-location>/WEB-INF/
</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.JasperEx
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
==========================
:(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Which version of the jars did you download ? Why not get 1.1.2 ?
ASKER
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_r t.tld</tag lib-locati on>
</taglib>
or
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/ tld/core_r t.tld</tag lib-locati on>
</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 :)
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/
</taglib>
or
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/
</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 :)
ASKER
>>> Which version of the jars did you download ? Why not get 1.1.2 ?
version 1.0
version 1.0
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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