日期:2014-05-18  浏览次数:20877 次

菜鸟第一次发言,用jstl解析xml出现异常,谁能帮我看看啊谢谢啊
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.x_005fif_jsp._jspService(org.apache.jsp.x_005fif_jsp:80)
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.IfTag.condition(IfTag.java:50)
javax.servlet.jsp.jstl.core.ConditionalTagSupport.doStartTag(ConditionalTagSupport.java:84)
org.apache.jsp.x_005fif_jsp._jspx_meth_x_if_0(org.apache.jsp.x_005fif_jsp:133)
org.apache.jsp.x_005fif_jsp._jspService(org.apache.jsp.x_005fif_jsp:64)
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)

------解决方案--------------------
查看你的web工程是否加载了xalan.jar包,
这个包在JSTL1.0里,你导入一下就可以了。