在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>