xml 代码
- xml version="1.0" encoding="UTF-8"?>
- >
- <struts-config>
- <data-sources />
- <form-beans>
- <form-bean name="userLoginForm"
- type="org.perfect.struts.form.UserLoginForm" />
- form-beans>
- <global-exceptions />
- <global-forwards />
- <action-mappings>
- <action
- input="/userLogin.jsp"
- path="/userLogin"
- scope="request"
- name="userLoginForm"
- type="org.springframework.web.struts.DelegatingActionProxy"
- >
- action>
- action-mappings>
- <message-resources
- parameter="org.perfect.struts.ApplicationResources" />
- <plug-in
- className="org.springframework.web.struts.ContextLoaderPlugIn">
- <set-property property="contextConfigLocation"
- value="/WEB-INF/applicationContext.xml" />
- plug-in>
- struts-config>
xml 代码
- xml version="1.0" encoding="UTF-8"?>
- <beans
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
- <bean id="user" class="org.perfect.struts.vo.User">bean>
- <bean name="/userLogin" class="org.perfect.struts.action.UserLoginAction" scope="singleton">
- <property name="user">
- <ref bean="user" />
- property>
- bean>
- beans>