SSM_OA的web.xml文件简单配置
来源:互联网 发布:阴阳师神龙强化数据 编辑:程序博客网 时间:2024/05/16 14:16
<?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" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>SSM_OA</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> <!--将所有请求的数据在spring中指定为utf8编码 --> <filter> <filter-name>Set Character Encoding</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>utf8</param-value> </init-param> <!-- 即使request请求已经包含编码格式,但是要求按照过滤的编码格式来进行编码 --> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>Set Character Encoding</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- Spring配置文件引入 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:config/spring-context.xml </param-value> </context-param> <!-- 配置监听器后,启动Tomcat服务器的时候就可启动Spring容器,从而执行spring-context.xml配置文件信息 --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- springMVC配置 --> <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:config/spring-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>/</url-pattern><!-- /,/*:所有请求都需要过滤 *.json:所有以.json结尾的请求都需要过滤 --> </servlet-mapping></web-app>
阅读全文
0 0
- SSM_OA的web.xml文件简单配置
- SSM_OA.Spring,xml文件配置
- web.xml文件的配置
- web.xml文件的配置
- web.xml文件的配置
- web.xml文件的配置
- web.xml简单配置
- web.xml文件配置
- web.xml文件配置
- web.xml文件配置
- 【文件配置】web.xml
- web.xml文件的作用----简单描述项目常见的几个配置
- web.xml、.properties资源文件的配置
- 关于web.xml文件的配置
- Struts应用配置的web.xml文件
- servlet 包的 web。xml文件配置
- web.xml 文件的配置 顺序
- WEB.xml文件的基本配置
- 交叉编译器
- XML生成(二):SAX生成XML
- spark实现PageRank
- 金色梦乡
- Linux学习笔记(1)-常用命令
- SSM_OA的web.xml文件简单配置
- 简单工厂模式VS工厂方法模式
- Count the string HDU
- Redis : Jedis性能测试
- 数据库SQL实战-答案解析(15-20)
- 【C#学习】继承和多态
- idea intellij syso [System.out.println();快速生成]
- 学习日记19
- jQuery