myeclipse中没出错,但是浏览器运行的时候出错了,这是在配置struts零配置出的错。web.xml代码如下……
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<!-- 指定默认加载如下包里的Action实例 ,多个包之间以英文逗号,隔开-->
<init-param>
<param-name>actionPackages</param-name>
<param-value>/src/lee</param-value>
</init-param>
<!-- 配置本应用使用的国际化资源文件 -->
<init-param>
<param-name>struts.custom.i18n.resources</param-name>
<param-value>messageResource</param-value>
</init-param>
</filter>
<!-- 让Struts的核心Filter拦截所有的请求 -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
</web-app>
浏览器运行的时候报错如下,以上代码是我照着书上敲的………………
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java:69)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:501)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:432)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
Apache Tomcat/6.0.18
各位高手大侠帮帮小弟我啊!!!!!!!在此先拜谢了
[解决办法]
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
改成这个试试看
[解决办法]
这个上面已经配置了……但是不行,是不是兼容性问题呢?
[解决办法]
原来是少了struts-codebehind-plugin-2.3.4.1.jar包