码迷,mamicode.com
首页 > 编程语言 > 详细

04.基于IDEA+Spring+Maven搭建测试项目--配置web.xml

时间:2018-07-01 19:05:40      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:测试   web   systems   3.0   cat   org   utf-8   mapping   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

标签:测试   web   systems   3.0   cat   org   utf-8   mapping   web.xml   

原文地址:https://www.cnblogs.com/xiuxingzhe/p/9250808.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!