Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

help with JSTL xml tags & tomcat

obinnahenreeAug 16 2008 — edited Aug 16 2008
hi, m learning JSTL and the core tags all work fine, but the xml tags throw the folowing exceptions while i try to deploy the JSP where i used them. i am using tomcat 5.5x and i also tried it tomcat 6.0x and same probs.
any suggestions will be welcomed. Sample code and exception below:

<%@ page contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
<html>
<body bgcolor="lightblue">

<c:import url="books.xml" var="url" />
<x:parse xml="${url}" var="docs" />

---------------------------------<br>

<x:forEach var="n" select="$docs/books/book" >

<x:out select="n/title" /><br></br>
<x:out select="n/author" />
<br>========================

</x:forEach>

</body>
</html>

org.apache.jasper.JasperException: org/apache/xpath/XPathException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 13 2008
Added on Aug 16 2008
8 comments
339 views