日期:2014-05-16  浏览次数:20346 次

Jsp诡异空指针

用spring tools suit开发一web程序,用sts自带的tomcat调试,工程结构是从一老工程考过来的,新建一jsp,报错如下:

?

java.lang.NullPointerException
at org.apache.jsp.index_jsp._jspInit(index_jsp.java:22)
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

?Google一下,原来是jsp-api.jar重复了,在WEB-INF/lib下删除之 解决。由于原有项目是正常工作的,所以此问题笔记一下,下次出现好解决。

?