zoukankan      html  css  js  c++  java
  • 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>
    
     
    
  • 相关阅读:
    form表单中name和id区别
    为什么我做网站开发不使用前端框架
    设置GridView表头的背景图片
    input文本框隐藏边框
    如何在asp.net页面使用css和js
    HTML与XHTML的差别
    asp.net实现关闭当前网页功能
    asp.net判断文件或文件夹是否存在
    asp.net自定义错误页面
    asp.net中textbox获得焦点后清空默认文本
  • 原文地址:https://www.cnblogs.com/qq1988627/p/6606921.html
Copyright © 2011-2022 走看看