<!-- struts+spring配置第一步 :配置插件-注意位置- struts-config.xml文件中>
<!--我的applicationContext.xml习惯放在src目录下-->
[quote] <plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="classpath:applicationContext.xml"
/>
</plug-in>[/quote]
<!-- struts+spring配置第二步 --struts-config.xml文件中>
<!-- 方式1 修改action的type属性如下:-->
[quote]<!-- <action name="fwxxForm" path="/fwxx" parameter="operate"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="list" path="/list.jsp" />
<forward name="detail" path="/detail.jsp" />
<forward name="modify" path="/modify.jsp" />
<forward name="error" path="/error.jsp" />
</action> [/quote] -->
<!--方式2 配置拦截器(注意位置,必须放在</action-mappings>后<message-resources>前)-->
[quote]<controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor"/>[/quote]
<!-- struts+spring配置第三步 --spring的配置文件中>
[quote]<bean name="/modify" class="com.aptech.jb.action.FWXXModifyAction"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="fwxxProcess">
<ref bean="fwxxProcess" />
</property>
</bean>[/quote]
<!--我的applicationContext.xml习惯放在src目录下-->
[quote] <plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="classpath:applicationContext.xml"
/>
</plug-in>[/quote]
<!-- struts+spring配置第二步 --struts-config.xml文件中>
<!-- 方式1 修改action的type属性如下:-->
[quote]<!-- <action name="fwxxForm" path="/fwxx" parameter="operate"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="list" path="/list.jsp" />
<forward name="detail" path="/detail.jsp" />
<forward name="modify" path="/modify.jsp" />
<forward name="error" path="/error.jsp" />
</action> [/quote] -->
<!--方式2 配置拦截器(注意位置,必须放在</action-mappings>后<message-resources>前)-->
[quote]<controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor"/>[/quote]
<!-- struts+spring配置第三步 --spring的配置文件中>
[quote]<bean name="/modify" class="com.aptech.jb.action.FWXXModifyAction"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="fwxxProcess">
<ref bean="fwxxProcess" />
</property>
</bean>[/quote]