读书人

struts-config.xml配备实现spring的依

发布时间: 2012-11-07 09:56:10 作者: rapoo

struts-config.xml配置实现spring的依赖注入

struts-config.xml中配置action的时候,将type属性改为"org.springframework.web.struts.DelegatingActionProxy",在spring的配置文件配置依赖注入才可以成功。

如下的代码:

?<action-mappings>
????<action attribute="registerForm" input="/form/register.jsp"
???name="registerForm" path="/register" scope="request"
???type="org.springframework.web.struts.DelegatingActionProxy">
???<forward name="failed" path="/form/failed.jsp" />
???<forward name="success" path="/form/success.jsp" />
??</action>
?</action-mappings>

读书人网 >XML SOAP

热点推荐