[size=x-large]在struts的xml文件中插入下面的代码:
struts中用委托代理方法,修改成下面红色的代码即可。
[color=red]type="org.springframework.web.struts.DelegatingActionProxy">[/color]
再在spring的配置文件中注入struts的ACTION
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="/WEB-INF/classes/applicationContext.xml" />
</plug-in>
[/size]struts中用委托代理方法,修改成下面红色的代码即可。
[color=red]type="org.springframework.web.struts.DelegatingActionProxy">[/color]
<action
attribute="loginForm"
input="login.jsp"
name="loginForm"
path="/login"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="success" path="/index.jsp" />
</action>
再在spring的配置文件中注入struts的ACTION
<!-- struts注入 -->
<bean name="/login" class="com.zhq.struts.action.LoginAction">
<property name="userdao">
<ref bean="userdao" />
</property>
<property name="user">
<ref bean="user" />
</property>
</bean>