`
yeer
  • 浏览: 49729 次
  • 性别: Icon_minigender_2
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论
阅读更多

1、struts、spring整合

     修改struts-config中action标签的type属性值,原来该属性值为请求要调用的action文件,现在改为用代理,值为:org.springframework.web.struts.DelegatingActionProxy

2、添加  

<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
  <set-property property="contextConfigLocation" value="/WEB-INF/classes/applicationContext.xml" />
</plug-in>

3、在applicationContext.xml文件中添加

 <bean name="/login" class="web.struts.action.LoginAction">
 <property name="service">
 <ref bean="service" />
 </property>
 </bean>

这一步表明login请求将要到达的action。property中的name值为

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics