jsp页面加入jstl的支持 关于jsp页面使用jstl的异常分析
人气:0想了解关于jsp页面使用jstl的异常分析的相关内容吗,在本文为您仔细讲解jsp页面加入jstl的支持的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:jsp页面,jstl,异常分析,下面大家一起来学习吧。
1.在jsp页面中使用如下代码加入jstl的支持 复制代码 代码如下:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2.如果jsp页面报如下异常
org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.Customer.addCustomerInfo_jsp
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:177)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
root cause
java.lang.ClassNotFoundException: org.apache.jsp.Customer.addCustomerInfo_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.springfr
amework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
那么很有可能是你的Tomcat的lib目录中没有jstl的jar包,所以才导致tomcat无法解析jstl
解决方案:在tomcat的lib目录中添加jstl的jar包即可。
jstljar包下载地址:下载jstl
加载全部内容