<?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>rbacDemo</display-name>
  
  
  <!--配置字符编码过滤器  -->
	<filter>
		<filter-name>encod</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>encod</filter-name>
		<url-pattern>/servlet/*</url-pattern>
	</filter-mapping>
	

  <!--以下是用来读取解析springmvc.xml这个xml的  -->
  <servlet>
	 <servlet-name>mvc</servlet-name>
	 <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  	 <!--配置初始化参数 -->
  	 <init-param>
  	 	<param-name>contextConfigLocation</param-name>
  	 	<param-value>classpath:springmvc.xml</param-value>
  	 </init-param>
  </servlet>
  <servlet-mapping>
	  	<servlet-name>mvc</servlet-name>
	  	<!--"/"指的是除了jsp之外的所有请求资源 -->
	  	<url-pattern>/</url-pattern>
	  	<!--"*.action"指的是：凡是以.action结尾的请求，才能进springmvc 。这个可以用作资源放行。还有一种放行方法是在springmvc里配置-->
	  	<!-- <url-pattern>*.action</url-pattern> -->
  </servlet-mapping>




	<!--这个监听器是解析 applicationContext-*.xml这种xml的 
		上下文参数，告诉sring配置文件路径
	-->
	<context-param>
		  <param-name>contextConfigLocation</param-name>
		  <param-value>classpath:applicationContext-*.xml</param-value>
	</context-param>
	  <!-- 配置读取xml的监听器 ，启动spring的监听器-->
	 <listener>
	  	<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	 </listener>
  
  
  
  <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>
</web-app>