web.xml配置
来源:互联网 发布:阿里云docker 编辑:程序博客网 时间:2024/06/08 13:03
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
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_2_5.xsd">
<!--监听器-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- 加载配置spring文件,这是放在src,或者resources下,默认加载WEB-INF下的xml -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring.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>*.action</url-pattern>
</filter-mapping>
<!-- springmvc【配置 -->
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<!-- 加载配置文件,这是放在src,或者resources下,默认加载WEB-INF下的xml -->
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:springmvc.xml</param-value>
</init-param>
</servlet>
<!-- springmvc只拦截.action -->
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
<web-app version="2.5"
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_2_5.xsd">
<!--监听器-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- 加载配置spring文件,这是放在src,或者resources下,默认加载WEB-INF下的xml -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring.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>*.action</url-pattern>
</filter-mapping>
<!-- springmvc【配置 -->
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<!-- 加载配置文件,这是放在src,或者resources下,默认加载WEB-INF下的xml -->
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:springmvc.xml</param-value>
</init-param>
</servlet>
<!-- springmvc只拦截.action -->
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
0 0
- log4j.xml web.xml配置
- web工程web.xml配置
- Web.XML 配置详解
- Web.XML 配置详解
- Web.Xml的配置
- web.xml配置说明
- web.xml配置详解
- web.xml配置详解
- Struts2 web.xml配置
- Tomcat web.xml配置
- tomcat web.xml配置
- web.xml配置说明
- web.xml详细配置
- web.xml配置讲解
- web.xml配置详解
- SSH配置:web.xml
- Web.XML 配置详解
- web.xml中的配置
- Android WebView如何隐藏地址栏,用WebView 来显示网页内容
- VUA 796 (无向图 求桥)
- 2016 CVPR 德州仪器 ADAS Tutorial
- H264 NALunit
- linux上nginx的安装启动以及配合php-fpm的使用
- web.xml配置
- Apache 配置文件httpd.conf 的含义
- Java 继承的详解
- win7下安装yii2高级模板全过程
- ORACLE10g的Scheduler简介
- js仿iPhone手机端alert,loading,正在加载...
- 控制iframe高度的万能方法
- ExpandableListAdapter详细介绍
- 自定义UIMenuController