04.基于IDEA+Spring+Maven搭建测试项目--配置web.xml
Posted 修行者HT
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了04.基于IDEA+Spring+Maven搭建测试项目--配置web.xml相关的知识,希望对你有一定的参考价值。
1 <!DOCTYPE web-app PUBLIC 2 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 3 "http://java.sun.com/dtd/web-app_2_3.dtd" > 4 5 <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 6 xmlns="http://java.sun.com/xml/ns/javaee" 7 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 8 http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> 9 10 <display-name>test-ma</display-name> 11 12 <filter> 13 <filter-name>encodingFilter</filter-name> 14 <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> 15 <init-param> 16 <param-name>encoding</param-name> 17 <param-value>UTF-8</param-value> 18 </init-param> 19 <init-param> 20 <param-name>forceEncoding</param-name> 21 <param-value>true</param-value> 22 </init-param> 23 </filter> 24 <filter-mapping> 25 <filter-name>encodingFilter</filter-name> 26 <url-pattern>/*</url-pattern> 27 </filter-mapping> 28 29 <context-param> 30 <param-name>contextConfigLocation</param-name> 31 <param-value>classpath:/spring/application-context.xml</param-value> 32 </context-param> 33 34 <listener> 35 <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 36 </listener> 37 </web-app>
以上是关于04.基于IDEA+Spring+Maven搭建测试项目--配置web.xml的主要内容,如果未能解决你的问题,请参考以下文章
02.基于IDEA+Spring+Maven搭建测试项目--Maven的配置文件settings.xml
03.基于IDEA+Spring+Maven搭建测试项目--常用dependency
02.基于IDEA+Spring+Maven搭建测试项目--配置logback.xml