<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name></display-name>
<welcome-file-list>
<welcome-file>index.jsp
</welcome-file>
</welcome-file-list>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation
</param-name>
<param-value>classpath:spring/applicationContext.xml
</param-value>
</context-param>
<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>
<servlet>
<servlet-name>springmvc
</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation
</param-name>
<param-value>classpath:spring/springmvc-servlet.xml
</param-value></init-param>
<load-on-startup>1
</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc
</servlet-name>
<url-pattern>*.do
</url-pattern>
</servlet-mapping>
<filter>
<filter-name>DelegatingFilterProxy
</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy
</filter-class>
<init-param>
<param-name>targetBeanName
</param-name>
<param-value>testFilter
</param-value>
</init-param>
<init-param>
<param-name>targetFilterLifecycle
</param-name>
<param-value>true
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>DelegatingFilterProxy
</filter-name>
<url-pattern>*.do
</url-pattern>
<url-pattern>*.jsp
</url-pattern>
</filter-mapping>
<error-page>
<error-code>404
</error-code>
<location>/web/error_page/404.jsp
</location>
</error-page>
<error-page>
<error-code>500
</error-code>
<location>/web/error_page/500.jsp
</location>
</error-page>
</web-app>
转载请注明原文地址: https://ju.6miu.com/read-1123155.html