web.xml

<?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">
	<filter>      
		<filter-name>UTF-8</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>      
	</filter>      
	<filter-mapping>      
    		<filter-name>UTF-8</filter-name>      
    		<url-pattern>/*</url-pattern>      
	</filter-mapping>  
	<filter>
		<filter-name>struts2</filter-name>
		<filter-class>
			org.apache.struts2.dispatcher.FilterDispatcher
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>struts2</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml
		</param-value>
	</context-param>
	<listener>
		<listener-class>
			org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>
	 <session-config>
		<session-timeout>10</session-timeout>
     </session-config>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <servlet> 
       <servlet-name>dwr-invoker</servlet-name> 
          <servlet-class> org.directwebremoting.servlet.DwrServlet</servlet-class> 
             <init-param>             
                <param-name> debug </param-name>           
                <param-value> true </param-value>       
             </init-param>       
             <init-param>            
           		<param-name> crossDomainSessionSecurity </param-name>  
               <param-value> false </param-value >   
             </init-param> 
  </servlet>
	<filter>    
      <filter-name>GzipJsFilter</filter-name>    
      <filter-class>com.byd.core.GzipJsFilter</filter-class>    
      <init-param>    
          <param-name>headers</param-name>    
          <param-value>Content-Encoding=gzip</param-value>    
      </init-param>    
</filter>    
<filter-mapping>    
   <filter-name>GzipJsFilter</filter-name>    
   <url-pattern>*.gzjs</url-pattern>    
</filter-mapping>
<filter>  
    <filter-name>GZIPFilter</filter-name>  
    <filter-class>com.tacitknowledge.filters.gzipfilter.GZIPFilter</filter-class>  
</filter>  
  <filter-mapping>  
    <filter-name>GZIPFilter</filter-name>  
    <url-pattern>*.js</url-pattern>  
  </filter-mapping>  
  <filter-mapping>  
    <filter-name>GZIPFilter</filter-name>  
    <url-pattern>*.css</url-pattern>  
  </filter-mapping>  
  
  <filter-mapping>  
    <filter-name>GZIPFilter</filter-name>  
    <url-pattern>*.html</url-pattern>  
  </filter-mapping>  
  
  <filter-mapping>  
    <filter-name>GZIPFilter</filter-name>  
    <url-pattern>*.gif</url-pattern>  
  </filter-mapping> 
  <filter-mapping>  
    <filter-name>GZIPFilter</filter-name>  
    <url-pattern>*.jpg</url-pattern>  
  </filter-mapping>   
	<filter-mapping>  
    <filter-name>GZIPFilter</filter-name>  
    <url-pattern>*.bmp</url-pattern>  
  </filter-mapping>   
</web-app>

 

 

posted @ 2011-07-21 15:08  上善¤若水  阅读(88)  评论(0编辑  收藏  举报