当前位置: 代码迷 >> Web前端 >> spring治理struts的配置
  详细解决方案

spring治理struts的配置

热度:139   发布时间:2012-10-21 09:00:07.0
spring管理struts的配置
在web.xml
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

在config.xml
<action-mappings>
<action path="/login" type="org.springframework.web.struts.DelegatingActionProxy" scope="request"></action>
</action-mappings>
<message-resources parameter="com.neusoft.struts.ApplicationResources" />
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="classpath:applicationContext.xml" />
</plug-in>

在application.xml
<bean name="/login" class="com.neusoft.struts.LoginAction"></bean>
  相关解决方案