- <?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
转载
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
MybatisPlus基础Xml使用教程
MybatisPlus基础最全教程,里面包含操作的核心教程以及重点难点,很适合新手以及中高级开发学习
mybatis mybatisplus springboot