1.主要让sPRing生成Action供struts使用 2.导入jar包struts2-spring-plugin-2.5.10.jar
struts2配置
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" "http://struts.apache.org/dtds/struts-2.5.dtd"><struts> <package name="ssh" extends="struts-default" namespace="/"> <!-- 使用通配符 需要添加属性method = --> <action name="TestAction_*" class="testAction" method="{1}"> <result name="success">/login.jsp</result> </action> </package></struts>spring配置
<?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.xsd"> <bean name="testAction" class="com.chet.action.TestAction"></bean></beans>新闻热点
疑难解答