首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

struts2-2.2.1 spring2.5.6 调整

2012-08-21 
struts2-2.2.1 spring2.5.6 整合?依赖jar包commons-fileupload-1.2.1.jarcommons-io-1.3.2.jar?commons-lo

struts2-2.2.1 spring2.5.6 整合

?

依赖jar包

commons-fileupload-1.2.1.jar

commons-io-1.3.2.jar?

commons-logging-1.1.jar?
freemarker-2.3.16.jar?

javassist-3.9.0.GA.jar
ognl-3.0.jar?
struts2-core-2.2.1.jar?

struts2-spring-plugin-2.2.1.jar
xwork-core-2.2.1.jar?

spring.jar

?

web.xml部分配置:

?

<listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener><context-param><param-name>contextConfigLocation</param-name><param-value>classpath:config/spring_gloable.xml</param-value></context-param>    <filter><filter-name>struts2.2.1</filter-name><filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class></filter><filter-mapping><filter-name>struts2.2.1</filter-name><url-pattern>/*</url-pattern></filter-mapping>

?struts.xml:

?

<!DOCTYPE struts PUBLIC        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"        "http://struts.apache.org/dtds/struts-2.0.dtd"><struts><constant name="struts.objectFactory" value="spring" /><include file="struts-default.xml"></include><package name="portal" extends="struts-default">          <action name="test" method="test">              <result>/test.jsp</result>          </action>      </package> </struts>

热点排行