方式三:通过Spring的DelegatingRequestProcessor类
步骤:
1、配置struts-config.xml
<controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor" />,删除action的type属性
(或者这么写:<controller>
1、配置struts-config.xml
<controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor" />,删除action的type属性
(或者这么写:<controller>
<set property property ="processorClass" value="org.springframework.web.struts.DelegatingRequestProcessor") />
</controller>
2、在Spring配置文件中
<bean name="/somepath" class="SomeAction"/>
<bean name="/somepath" class="SomeAction"/>
注意:A.首先是bean name,而不是ID。B.name的值要跟struts-config.xml的action的path值相同。