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">
- <welcome-file-list>
  <welcome-file>index.jsp</welcome-file> 
  </welcome-file-list>
  </web-app>

解决方案 »

  1.   

    说详细点,你要过滤什么
    用<fiter></fiter>
      

  2.   

    。。你还要写一个class继承filter写完再配置,和servlet映射差不多
      

  3.   

     <filter>
       <filter-name>随便命个名</filter-name>
       <filter-class>
       你的过滤器的类的位置(比如com.CharFilter)
       </filter-class>
      </filter>
      <filter-mapping>
       <filter-name>对应你命的名</filter-name>
       <url-pattern>你要过滤的文件(比如/×表示全部都要过滤)</url-pattern>
      </filter-mapping>