The "out.jsp" contains
========================================================
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<html>
<head>
<title>JSTL: XML Support -- Parse / Out</title>
</head>
<body bgcolor="#FFFFFF">
<h3><x:parse> / <x:out></h3>
<c:import var="docString" url="games.xml"/>
<x:parse var="doc" doc="${docString}"/>
<table border=1>
<tr>
<td valign="top"><pre><c:out value="${docString}"/></pre></td>
<td valign="top">
<table border=1>
<tr>
<th>Expression</th>
<th>Result</th>
</tr>
<%--
<tr>
<td>3 + 3</td>
<td><pre><x:out select="3 + 3"/></pre></td>
</tr>
--%>
<tr>
<td>$doc//sport</td>
<td><pre><x:out select="$doc//sport"/></pre></td>
</tr>
<tr>
<td>$doc/games/country/*</td>
<td><pre><x:out select="$doc/games/country/*"/></pre></td>
</tr>
<tr>
<td>$doc//*</td>
<td><pre><x:out select="$doc//*"/></pre></td>
</tr>
<tr>
<td>$doc/games/country</td>
<td><pre><x:out select="$doc/games/country"/></pre></td>
</tr>
<tr>
<td>$doc/games/country[last()]</td>
<td><pre><x:out select="$doc/games/country[last()]"/></pre></td>
</tr>
<tr>
<td>$doc//@id</td>
<td><pre><x:out select="$doc//@id"/></pre></td>
</tr>
<tr>
<td>$doc//[EMAIL PROTECTED]'Denmark']</td>
<td><pre><x:out select="$doc//[EMAIL PROTECTED]'Denmark']"/></pre></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
======================================================
games.xml contains
===========================
<?xml version="1.0" encoding="ISO-8859-1"?>
<games>
<country id="Luxembourg">
<athlete>
<name>Lux 1</name>
<sport>swimming</sport>
<age>23</age>
<gender>M</gender>
</athlete>
<athlete>
<name>Lux 2</name>
<sport>wrestling</sport>
<age>31</age>
<gender>M</gender>
</athlete>
</country>
<country id="Denmark">
<athlete>
<name>Den 1</name>
<sport>cycling</sport>
<age>18</age>
<gender>F</gender>
</athlete>
<athlete>
<name>Den 2</name>
<sport>sailing</sport>
<age>27</age>
<gender>M</gender>
</athlete>
</country>
</games>
============================
I am using Tomcat 5.5 app svr.
when I run the web app the following errors are shown
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from
fulfilling this request.
exception javax.servlet.ServletException: org/apache/xpath/XPathException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:155)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause java.lang.NoClassDefFoundError: org/apache/xpath/XPathException
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1629)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
org.apache.taglibs.standard.tag.common.xml.ExprSupport.doStartTag(ExprSupport.java:63)
org.apache.jsp.xml.Out_jsp._jspx_meth_x_out_0(org.apache.jsp.xml.Out_jsp:230)
org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:97)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
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.9 logs.
Thanks & Regards
Rajasekhar
--- On Mon, 14/7/08, Kris Schneider <[EMAIL PROTECTED]> wrote:
From: Kris Schneider <[EMAIL PROTECTED]>
Subject: Re: JSTL XML ---org/apache/xpath/XPathException
To: "Tag Libraries Users List" <[email protected]>
Date: Monday, 14 July, 2008, 10:49 PM
Can you provide some more details about how you're using the tag and
which app server and version you're using?
On Mon, Jul 14, 2008 at 10:49 AM, Rajasekhar <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have used xml tags of jstl in my jsp. but it throwing errors like the
following..How can I get rid of it.
> javax.servlet.ServletException: org/apache/xpath/XPathException
>
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
>
org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:155)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
>
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>
> root cause
>
>
> Thanks & Regards
> Rajasekhar
--
Kris Schneider <mailto:[EMAIL PROTECTED]>
directThought <http://www.directThought.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Unlimited freedom, unlimited storage. Get it now, on
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/