WEB-INF/lib下最好不要有jsp-api,servlet-api 包

报如下错误

exception 

javax.servlet.ServletException: org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 28 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory


 

找了好久,发现是web-inf/lib下的jsp-api,servlet-api与tomcat/lib下的包重复,删除就好了。

 

特别是用MVN管理的工程一定要注意。

你可能感兴趣的:(apache,tomcat,Web,jsp,servlet)