<?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:jsp="http://java.sun.com/xml/ns/javaee/jsp" 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_3_0.xsd" version="3.0">
<display-name>system </display-name>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>esysm.root</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<!-- <param-value>classpath:conf/spring-context.xml, classpath:conf/spring-cache.xml, classpath:conf/spring-task.xml</param-value> -->
<param-value>classpath:conf/spring-context.xml, classpath:conf/spring-cache.xml</param-value>
</context-param>
<!-- 监听器配置 -->
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- 过滤器配置 -->
<!-- 字符集过滤 -->
<filter>
<filter-name>CharacterEncodingFilter</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>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--
<filter>
<filter-name>HiddenHttpMethodFilter</filter-name>
<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>HiddenHttpMethodFilter</filter-name>
<servlet-name>DispatcherServlet</servlet-name>
</filter-mapping>
-->
<!-- 登陆过滤 -->
<filter>
<filter-name>LoginFilter</filter-name>
<filter-class>com.wondersgroup.esysm.security.filter.LoginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LoginFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<!-- url特殊字符过滤 -->
<filter>
<filter-name>XSSFilter</filter-name>
<filter-class>com.wondersgroup.esysm.core.filter.XSSFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>XSSFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- servlet配置 -->
<!-- 验证码
<servlet>
<servlet-name>CaptchaServlet</servlet-name>
<servlet-class>com.wondersgroup.esysm.core.servlet.CaptchaServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CaptchaServlet</servlet-name>
<url-pattern>/captcha</url-pattern>
</servlet-mapping>
-->
<servlet>
<servlet-name>DispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:conf/spring-mvc.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>DispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- -->
<servlet>
<servlet-name>InitServlet</servlet-name>
<servlet-class>com.wondersgroup.esysm.core.servlet.InitServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>InitServlet</servlet-name>
<url-pattern>/reload</url-pattern>
</servlet-mapping>
<!--
<servlet>
<servlet-name>PollingServlet</servlet-name>
<servlet-class>com.wondersgroup.esysm.support.servlet.PollingServlet</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>PollingServlet</servlet-name>
<url-pattern>/polling</url-pattern>
</servlet-mapping>
-->
<!-- jsp 标签 -->
<!-- jstl -->
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core_rt</taglib-uri>
<taglib-location>/WEB-INF/tld/c-rt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/functions</taglib-uri>
<taglib-location>/WEB-INF/tld/fn.tld</taglib-location>
</taglib>
<!-- 自定义tools -->
<taglib>
<taglib-uri>tools</taglib-uri>
<taglib-location>/WEB-INF/tld/tools.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>pages</taglib-uri>
<taglib-location>/WEB-INF/tld/pages.tld</taglib-location>
</taglib>
</jsp-config>
<!-- session超时设置 -->
<session-config>
<session-timeout>60</session-timeout>
</session-config>
</web-app>
web.xml 配置详解
最新推荐文章于 2024-09-09 10:55:33 发布