File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes jstl xml error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jstl xml error" Watch "jstl xml error" New topic
Author

jstl xml error

srikanth arroju
Ranch Hand

Joined: Aug 02, 2006
Posts: 66
xml file

<book>
<title>Professional JSP</title>
<author>Brown et. al</author>
<isbn>1-59059-513-0</isbn>
<published>September 2005</published>
<publisher>Apress</publisher>
<url>www.apress.com/book/bookDisplay.html?bID=464</url>
</book>

jsp file

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
<html>
<body>
<c:import url="book.xml" var="url" />
<x:parse xml="${url}" var="book" scope="session" />
<x:choose>
<x:when select="$book/book/publisher='Apress'">
Another great title from Apress!
</x:when>
<x:when select="$book/book/publisher='Bloggs Publisher'"
A reasonable title from Bloggs Publisher!
</x:when>
<xtherwise>
A title from an unknown publisher
</xtherwise>
</x:choose>
<p>
<b><xut select="$book/book/title"/></b><br>
<xut select="$book/book/author"/><br>
<xut select="$book/book/url"/><br>
</body>
</html>

generated an error

org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
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)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jstl xml error