<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
	license agreements. See the NOTICE file distributed with this work for additional 
	information regarding copyright ownership. The ASF licenses this file to 
	You under the Apache License, Version 2.0 (the "License"); you may not use 
	this file except in compliance with the License. You may obtain a copy of 
	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
	by applicable law or agreed to in writing, software distributed under the 
	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
	OF ANY KIND, either express or implied. See the License for the specific 
	language governing permissions and limitations under the License. -->
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
                      http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
	version="3.1" metadata-complete="true">

	<description>
      Servlet and JSP Examples.
    </description>
	<display-name>Servlet and JSP Examples</display-name>

	<!-- ========================单点登录开始 ======================== -->
	<!--用于单点退出，该过滤器用于实现单点登出功能，可选配置 -->
	<listener>
		<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
	</listener>
	<!--该过滤器用于实现单点登出功能，可选配置。 -->
	<filter>
		<filter-name>CASSingle Sign OutFilter</filter-name>
		<filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>CASSingle Sign OutFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<filter>
		<filter-name>CASFilter</filter-name>
		<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
		<init-param>
			<param-name>casServerLoginUrl</param-name>
			<param-value>http://localhost:18080/cas-server/login</param-value>
		</init-param>
		<init-param>
			<param-name>serverName</param-name>
			<param-value>http://localhost:8082</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>CASFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<!--该过滤器负责对Ticket的校验工作，必须启用它 -->
	<filter>
		<filter-name>CASValidationFilter</filter-name>
		<filter-class>
			org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter
		</filter-class>
		<init-param>
			<param-name>casServerUrlPrefix</param-name>
			<param-value>http://localhost:18080/cas-server</param-value>
		</init-param>
		<init-param>
			<param-name>serverName</param-name>
			<param-value>http://localhost:8082</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>CASValidationFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<!-- 该过滤器负责实现HttpServletRequest请求的包裹， 比如允许开发者通过HttpServletRequest的getRemoteUser()方法获得SSO登录用户的登录名，可选配置。 -->
	<filter>
		<filter-name>CASHttpServletRequest WrapperFilter</filter-name>
		<filter-class>
			org.jasig.cas.client.util.HttpServletRequestWrapperFilter
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>CASHttpServletRequest WrapperFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<!-- 该过滤器使得开发者可以通过org.jasig.cas.client.util.AssertionHolder来获取用户的登录名。 比如AssertionHolder.getAssertion().getPrincipal().getName()。 -->
	<filter>
		<filter-name>CASAssertion Thread LocalFilter</filter-name>
		<filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>CASAssertion Thread LocalFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<!-- ========================单点登录结束 ======================== -->


	<filter>
		<filter-name>Request Dumper Filter</filter-name>
		<filter-class>org.apache.catalina.filters.RequestDumperFilter</filter-class>
	</filter>

	<!-- Example filter to set character encoding on each request -->
	<filter>
		<filter-name>Set Character Encoding</filter-name>
		<filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
		<async-supported>true</async-supported>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
		<init-param>
			<param-name>ignore</param-name>
			<param-value>false</param-value>
		</init-param>
	</filter>


	<!-- Define filter mappings for the timing filters -->
	<!-- <filter-mapping> <filter-name>Timing Filter</filter-name> <url-pattern>/*</url-pattern> 
		</filter-mapping> -->

	<!-- Example filter mapping to apply the "Set Character Encoding" filter 
		to *all* requests processed by this web application -->
	<filter-mapping>
		<filter-name>Set Character Encoding</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<!-- <filter-mapping> <filter-name>Compression Filter</filter-name> <url-pattern>/CompressionTest</url-pattern> 
		</filter-mapping> -->

	<!-- <filter-mapping> <filter-name>Request Dumper Filter</filter-name> <url-pattern>/*</url-pattern> 
		</filter-mapping> -->



	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.xhtml</welcome-file>
		<welcome-file>index.htm</welcome-file>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>


</web-app>
