(1)Struts与Spring整合
<1> 在struts配置文件中配置spring配置文件
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property="contextConfigLocation" value="/WEB-INF/beans-config.xml" /> </plug-in> |
<2> 在struts配置文件中配置Action代理
<action attribute="empForm" input="/form/add.jsp" name="empForm" path="/addemp" scope="request" type="org.springframework.web.struts.DelegatingActionProxy" validate="false"> <forward name="success" path="/index.jsp"></forward> </action> |
<3> 在spring配置文件中配置Action
<bean name="/addemp" class="com.buat.struts.action.AddEmpAction"> <property name="..."> ... </property> </bean> |