You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation= "http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id= "WebApp_ID" version= "3.1" >
<display-name > SpringMVCFirst</display-name>
<welcome-file-list >
<welcome-file > index.html</welcome-file>
<welcome-file > index.htm</welcome-file>
<welcome-file > index.jsp</welcome-file>
<welcome-file > default.html</welcome-file>
<welcome-file > default.htm</welcome-file>
<welcome-file > default.jsp</welcome-file>
</welcome-file-list>
<servlet >
<servlet-name > springDispatcherServlet</servlet-name>
<servlet-class > org.springframework.web.servlet.DispatcherServlet</servlet-class>
<!-- 配置DispatcherServlet的初始化参数 -->
<init-param >
<param-name > contextConfigLocation</param-name>
<!-- 配置SpringMVC配置文件的位置和名称 -->
<param-value > classpath:springmvc.xml</param-value>
</init-param>
<!-- 该servlet在第一次加载的时候就被创建, 而不是等请求时才创建 -->
<load-on-startup > 1</load-on-startup>
</servlet>
<servlet-mapping >
<servlet-name > springDispatcherServlet</servlet-name>
<!-- 可以应答所有请求 -->
<url-pattern > /</url-pattern>
</servlet-mapping>
<!-- 编码过滤器,解决中文乱码问题 -->
<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>
</web-app>