• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

jstl xml error

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
<x:otherwise>
A title from an unknown publisher
</x:otherwise>
</x:choose>
<p>
<b><x:out select="$book/book/title"/></b><br>
<x:out select="$book/book/author"/><br>
<x:out 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 didn't like the taste of tongue and it didn't like the taste of me. I will now try this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic