Exception analysis: jstl for jsp pages

Source: Internet
Author: User

[Html]
 


1. Add jstl support to the following code on the jsp page

<% @ Taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>


2. If the jsp page reports the following exception

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)

It is likely that your Tomcat lib directory does not contain the jstl jar package, so tomcat cannot parse jstl.

Solution: add the jstl jar package to the tomcat lib directory.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.