tomcat7,maven运行出错,求帮助

jack_jones 发布于 2014/11/02 14:14
阅读 335
收藏 0
         <plugin>
             <groupId>org.apache.tomcat.maven</groupId>
             <artifactId>tomcat7-maven-plugin</artifactId>
             <version>2.2</version>
             <configuration>
                 <path>/test</path>
             </configuration>

         </plugin>

jsp页面:index.jsp

<%@ page language="java" pageEncoding="UTF-8"%>
<html>
<head>
</head>

<body>
<h2>my test</h2>
</body>
</html>


启动:mvn tomcat7:run


访问index.jsp,报错

十一月 02, 2014 2:11:26 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [spring] in context with path [/test] threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at org.apache.jsp.WEB_002dINF.views.index_jsp._jspInit(index_jsp.java:31)
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:180)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


以下是问题补充:

@jack_jones:我用jetty运行都好使mvn jetty:run,就是用tomcat运行报错 (2014/11/02 14:15)
@jack_jones:解决了,是包冲突 (2014/11/02 17:21)
加载中
0
jeffsui
jeffsui
有个maven cargo插件你了解下
jack_jones
jack_jones
我只用tomcat插件运行,不用部署
0
jeffsui
jeffsui
你用户名密码哪里配置的?
jack_jones
jack_jones
用户名密码?没配啊,官网没说配啊,我只用maven的tomcat插件运行
返回顶部
顶部