spring和struts2的web.Xml配置(spring的web加载)
2011-11-28 12:01
507 查看
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value> UTF-8 </param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern> /* </url-pattern> </filter-mapping> <filter> <filter-name>strutsFilter</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> <init-param> <param-name>config</param-name> <param-value> struts-default.xml,struts-plugin.xml,../struts-config/struts.xml,../struts-config/struts-1.xml,../struts-config/struts-2.xml </param-value> </init-param> </filter> <filter-mapping> <filter-name>strutsFilter</filter-name> <url-pattern> *.action </url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <listener> <listener-class> org.springframework.web.context.request.RequestContextListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:com/sg123/web/spring/spring-*.xml </param-value> </context-param> <servlet> <servlet-name>JspSupportServlet</servlet-name> <servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> </web-app>
相关文章推荐
- web.xml 配制加载spring上下文及 Spring context-param param-value classpath 配置加载问题
- 浅谈web.xml文件中加载Spring配置文件和SpringMVC配置文件
- web.xml文件中配置(servlet, spring, filter, listenr)的加载顺序(一)
- 加载Spring的 Web.xml配置
- 如何在web.xml配置spring,struts2配置以及过滤器
- spring通过在web.xml 中配置ContextLoaderListener 来加载co...
- 通过web.xml中的监听器加载spring配置文件
- SSH开发环境的配置:web.xml、Spring集成hibernate和Spring集成Struts2
- web.xml文件中配置(servlet, spring, filter, listenr)的加载顺序 研究
- web.xml 文件中一般包括 servlet, spring, filter, listenr的配置。那么他们是按照一个什么顺序加载呢?
- 通过web.xml文件自动启动spring容器加载对应的配置文件
- web.xml文件中配置(servlet, spring, filter, listenr)的加载顺序研究
- spring的配置文件在web.xml中加载的方式
- applicationContext.xml文件中怎么配置struts2和spring配置文件的加载路径
- struts2整合spring 时web.xml的配置
- spring的配置文件在web.xml中加载的方式
- web.xml文件中配置( listenr, filter,servlet, spring)的加载顺序 研究(转)
- web.xml文件中配置(servlet, spring, filter, listenr)的加载顺序 研究
- spring与struts2 mvc共存web.xml简单配置
- Web.xml Webapp配置加载log4j和Spring