web.xml 6.14 KB
Newer Older
罗绍泽 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	 <display-name>jfV5lcyq</display-name>
	 <context-param>  
	    <param-name>webAppRootKey</param-name>  
	    <param-value>jfV5lcyq.root</param-value>  
     </context-param>
	 
	 <context-param>
        <!-- log4j配置文件位置 -->
        <param-name>log4jConfigLocation</param-name>
        <param-value>/WEB-INF/conf/gaowj/bl/log4j.properties</param-value>
    </context-param>
    <context-param>
        <param-name>log4jRefreshInterval</param-name>
        <param-value>6000</param-value>
    </context-param>
    <!-- log4j监听器 -->
    <listener>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener>
	 
     <context-param>   
       <param-name>contextConfigLocation</param-name>   
       <param-value>/WEB-INF/conf/gaowj/bl/applicationContext-business.xml</param-value>   
     </context-param>
     
     <!-- 启用Web监控统计功能 -->
	 <filter>
		<filter-name>DruidWebStatFilter</filter-name>
		<filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
		<init-param>
			<param-name>exclusions</param-name>
			<param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>DruidWebStatFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<servlet>
		<servlet-name>DruidStatView</servlet-name>
		<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>DruidStatView</servlet-name>
		<url-pattern>/druid/*</url-pattern>
	</servlet-mapping>
     
     <!-- spring监听器-->
     <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
     </listener>
    <!-- spring监听器,使用scrope=request 时必须加上-->
    <listener>
     <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>
    
    <listener>
      <listener-class>
        com.gaowj.business.listener.myHttpSessionAttributeListener
      </listener-class>
    </listener>
    
    <!-- 该过滤器负责用户的认证工作,必须启用它 -->    
	 <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:8080/cas-test01/login</param-value><!-- cas 服务器登录 地址  http://IP:PORT/CasWebProName/login -->    
	   </init-param>    
	   <init-param>    
	      <!-- 这里的server是服务端的IP -->    
	      <param-name>serverName</param-name>    
	      <param-value>http://localhost:8082</param-value><!-- 客户端服务器地址   http://IP:PORT -->    
	   </init-param>    
	   </filter> 
	   <filter-mapping>    
	       <filter-name>CASFilter</filter-name>    
	       <url-pattern>/cas.jsp</url-pattern> 
	       <!-- <url-pattern>/*</url-pattern>  -->  
	   </filter-mapping>  
	   
	   <!-- 该过滤器负责对Ticket的校验工作,必须启用它 -->    
      <filter>    
        <filter-name>CAS Validation Filter</filter-name>    
        <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>    
        <init-param>    
           <param-name>casServerUrlPrefix</param-name>    
           <param-value>http://localhost:8080/cas-test01</param-value><!-- cas 服务器地址  http://IP:PORT/CasWebProName -->    
        </init-param>    
        <init-param>    
           <param-name>serverName</param-name>    
           <param-value>http://localhost:8082</param-value><!-- 客户端服务器地址   http://IP:PORT -->    
        </init-param>    
      </filter>    
      <filter-mapping>    
        <filter-name>CAS Validation Filter</filter-name>    
        <url-pattern>/cas.jsp</url-pattern>    
      </filter-mapping>
      
      <!-- 该过滤器负责实现HttpServletRequest请求的包裹,
		比如允许开发者通过HttpServletRequest的getRemoteUser()方法获得SSO登录用户的登录名,可选配置。 -->
		<filter>
		  <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
		  <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
		</filter>
		<filter-mapping>
        <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
           <url-pattern>/*</url-pattern>
        </filter-mapping>
    
	<filter>
      <filter-name>struts2</filter-name>
      <filter-class>com.gaowj.business.filter.myStrutsPrepareAndExecuteFilter</filter-class>
      <!-- org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter//com.gaowj.business.filter.myStrutsPrepareAndExecuteFilter -->
    </filter>
    <filter-mapping>
      <filter-name>struts2</filter-name>
      <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <servlet>
      <servlet-name>initServlet</servlet-name>
      <servlet-class>com.gaowj.business.util.InitServlet</servlet-class>
      <load-on-startup>2</load-on-startup>
    </servlet>
    
    <!-- 是否允许同一帐号多地登陆,为1则允许,为0则不允许-->
    <context-param>   
       <param-name>MultiUserLogin</param-name>   
       <param-value>1</param-value>   
     </context-param>
     
   <!-- 是否启用验证码,为1则启用,其它数字默认为不启用-->
    <context-param>   
       <param-name>yzm</param-name>   
       <param-value>1</param-value>   
    </context-param>
    
    <session-config>
        <session-timeout>60</session-timeout>
    </session-config>
    
	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
	
	<error-page>
      <error-code>404</error-code>
      <location>/system/pages/error/error404.jsp</location>
    </error-page>

    <error-page>
        <error-code>500</error-code>
        <location>/system/pages/error/error50x.jsp</location>
    </error-page>
</web-app>