url-pattern有"/room/paper.*"这种写法吗?我还真的不清楚,如果是
/room/paper/* 应该没有问题吧!

解决方案 »

  1.   

    <filter-mapping>
    <filter-name>paperFilter</filter-name>
    <url-pattern>/room/paper.*</url-pattern>
    </filter-mapping>
    -->
    <filter-mapping>
    <servlet-name>paperFilter</servlet-name>
    <url-pattern>/room/paper.*</url-pattern>
    </filter-mapping>
      

  2.   

    url-pattern有"/room/paper.*"这种写法吗?我还真的不清楚,如果是
    /room/paper/* 应该没有问题吧!
    -------------------------------------
    我在oc4j orion下这个都能行的。但是oc4j用的是jdk1.3.1我不知道怎么配1。4。1的,jdk1.3.1里没有String.split()!我要用的。orion在使用的时候出现了中文乱码的问题,是部分乱码。<filter-mapping>
    <filter-name>paperFilter</filter-name>
    <url-pattern>/room/paper.*</url-pattern>
    </filter-mapping>
    -->
    <filter-mapping>
    <servlet-name>paperFilter</servlet-name>
    <url-pattern>/room/paper.*</url-pattern>
    </filter-mapping>
    ---------------------------------------------
    <servlet-name>paperFilter</servlet-name>为什么这么改?
    我前面定义了
      <filter>
        <filter-name>paperFilter</filter-name>
        <filter-class>com.elvala.examj.PaperFilter</filter-class>
      </filter>
    并没有定义
    <servlet>...
      

  3.   

    这是根据tomcat中web.xml里的标记添加的
      

  4.   

    怎么可能?
    http://java.sun.com/dtd/web-app_2_3.dtd<!--
    Declaration of the filter mappings in this web application. The
    container uses the filter-mapping declarations to decide which filters
    to apply to a request, and in what order. The container matches the
    request URI to a Servlet in the normal way. To determine which filters
    to apply it matches filter-mapping declarations either on servlet-name,
    or on url-pattern for each filter-mapping element, depending on which
    style is used. The order in which filters are invoked is the order in
    which filter-mapping declarations that match a request URI for a
    servlet appear in the list of filter-mapping elements.The filter-name
    value must be the value of the <filter-name> sub-elements of one of the
    <filter> declarations in the deployment descriptor.Used in: web-app
    -->
    <!ELEMENT filter-mapping (filter-name, (url-pattern | servlet-name))>我将
    <filter-mapping>
    <filter-name>paperFilter</filter-name>
    <url-pattern>/room/paper.*</url-pattern>
    </filter-mapping>
    中的>/room/paper.*</
    改成了我特定的paper.view现在可以实现得差不多了。
    可是还是不能达到理想的效果。为什么orion里就一点问题都没有呢?