<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>web-site</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/config/applicationContext-base.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
<init-param>
<param-name>configFile</param-name>
<param-value>/config/sitemesh.xml</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--
<filter>
<filter-name>struts-prepare</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
</filter>
-->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<!--
<init-param>
<param-name>config</param-name>
<param-value>
struts-default.xml,struts-plugin.xml,struts.xml,conf/my.struts.xml
</param-value>
</init-param>
-->
</filter>
<!--
<filter-mapping>
<filter-name>struts-prepare</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetFilterLifecycle</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>JspSupportServlet</servlet-name>
<servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>config/dwr.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>sitemesh-freemarker</servlet-name>
<servlet-class>org.apache.struts2.sitemesh.FreemarkerDecoratorServlet</servlet-class>
<!--
<init-param>
<param-name>TemplatePath</param-name>
<param-value>/page/decorator/</param-value>
</init-param>
-->
<init-param>
<param-name>default_encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>sitemesh-freemarker</servlet-name>
<url-pattern>*.ftl</url-pattern>
</servlet-mapping>
<listener>
<listener-class>org.apache.struts2.dispatcher.ng.listener.StrutsListener</listener-class>
</listener>
<jsp-config>
<taglib>
<taglib-uri>sitemesh-decorator</taglib-uri>
<taglib-location>/tld/sitemesh-decorator.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>sitemesh-page</taglib-uri>
<taglib-location>/tld/sitemesh-page.tld</taglib-location>
</taglib>
</jsp-config>
<error-page>
<error-code>400</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<error-code>401</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<error-code>402</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<error-code>405</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<error-code>406</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<error-code>407</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<error-code>413</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<error-code>414</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/page/error/error.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/page/error/errorException.jsp</location>
</error-page>
<welcome-file-list>
<welcome-file></welcome-file>
</welcome-file-list>
</web-app>
分享到:
相关推荐
web.xml配置详解web.xml配置详解web.xml配置详解web.xml配置详解web.xml配置详解web.xml配置详解web.xml配置详解
web.xml配置文件详解让开发人员更加清楚web.xml是怎么配置。以及各个配置的作用。
全面详细讲述web.xml个元素的用途 还有实例哦
在web.xml中引入其他xml配置文件的步骤,含引入错误解决。
struts.xml和applicationContext.xml、web.xml的配置
Tomcat中用web.xml控制Web应用详解
web.xml 各属性作用描述 Web.xml 常用元素 <web‐app> ‐name>‐name>定义了WEB 应用的名字 <description></description> 声明WEB 应用的描述信息
spring-mvc.xml spring-mybatis.xml web.xml log4j.properties,项目中需要用到的配置文件。直接可用。
为tomcat服务器配置https,tomcat需要设置的server.xml与web.xml配置。可以帮助小白为tomcat服务器配置https协议(域名)。
web.xml加载顺序与web.xml常用节点解析
jboss-web.xml jndi.properties oracle-ds.xml三个文件,EJB+JPA 所需要的一些配置文件
web.xml dwr.xml 任何一个dwr.xml的文件都需要包含DWR DOCTYPE的声明行,。。 有几个术语有必要理解,参数叫做converted,远程Bean叫做created.如果远程Bean A有个方法A.blah(B),那么你需要为A建立一个created,为B建立...
servlet的写登陆管理系统用到的web.xml
JSP里web.xml实现错误处理页面的制作404,和500
web.xml 中的listener、 filter、servlet 加载顺序及其详解
web.xml 文件详解 web.xml 文件详解 web.xml 文件详解 web.xml 文件详解
Filter过滤器的代码及其web.xml配置代码 很好的解决网页乱码问题,很方便,只要按照名字添加就可以了
web.xml 详解
ssh的web.xml的配置,很实用的哦!
由于经常使用Maven创建web工程所以需要使用web.xml默认模板