maven项目 jsp报错

Posted 天空_Good

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了maven项目 jsp报错相关的知识,希望对你有一定的参考价值。

 1 HTTP Status 500 - java.lang.NullPointerException
 2 
 3 type Exception report
 4 
 5 message java.lang.NullPointerException
 6 
 7 description The server encountered an internal error that prevented it from fulfilling this request.
 8 
 9 exception
10 
11 org.apache.jasper.JasperException: java.lang.NullPointerException
12     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)
13     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:396)
14     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
15     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
16     javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
17     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
18     org.nutz.mvc.NutFilter.nextChain(NutFilter.java:226)
19     org.nutz.mvc.NutFilter.doFilter(NutFilter.java:201)
20 root cause
21 
22 java.lang.NullPointerException
23     org.apache.jsp.index_jsp._jspInit(index_jsp.java:31)
24     org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)
25     org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:180)
26     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
27     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
28     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
29     javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
30     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
31     org.nutz.mvc.NutFilter.nextChain(NutFilter.java:226)
32     org.nutz.mvc.NutFilter.doFilter(NutFilter.java:201)
33 note The full stack trace of the root cause is available in the Apache Tomcat/7.0.47 logs.

原因是jar冲突

删掉就OK了。

<dependency>
  <groupId>javax.servlet.jsp</groupId>
  <artifactId>jsp-api</artifactId>
  <version>2.2.1-b03</version>
</dependency>

 





以上是关于maven项目 jsp报错的主要内容,如果未能解决你的问题,请参考以下文章

maven web项目的web.xml报错The markup in the document following the root element must be well-formed.(代码片段

Maven新建web项目jsp报错

Maven新建webapp项目index.jsp报错

Eclipse下Maven新建Web项目index.jsp报错完美解决(war包)

myeclipse之SVN导入maven工程报错

eclipse在jsp界面上的第一行出现了报错,点报错的地方出现了这个,怎么回事?需要啥?