<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/config/struts-default.xml,
/WEB-INF/config/struts-test.xml,
/WEB-INF/config/member/struts-member.xml
</param-value>
</init-param>
</filter>
就报错 com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.ObjectFactory, name='default'] in public void com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.setObjectFactory(com.opensymphony.xwork2.ObjectFactory). - Class: com.opensymphony.xwork2.inject.ContainerImpl
File: ContainerImpl.java
Method: addInjectorsForMembers
Line: 144 - com/opensymphony/xwork2/inject/ContainerImpl.java:144:-1
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/config/struts-default.xml,
/WEB-INF/config/struts-test.xml,
/WEB-INF/config/member/struts-member.xml
</param-value>
</init-param>
</filter>
就报错 com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.ObjectFactory, name='default'] in public void com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.setObjectFactory(com.opensymphony.xwork2.ObjectFactory). - Class: com.opensymphony.xwork2.inject.ContainerImpl
File: ContainerImpl.java
Method: addInjectorsForMembers
Line: 144 - com/opensymphony/xwork2/inject/ContainerImpl.java:144:-1
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
好像是更新的问题吧 我记不太清楚了 你改成我这样试试
我已经修改了org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
还是报那个错误
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>StrutsPrepareAndExecuteFilter 是 struts2-core-2.3.4.jar 这个jar包里面的