DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33761>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33761

           Summary: url-pattern not according to Java Servlet 2.3 Spec.
           Product: Tomcat 4
           Version: 4.1.31
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


ok... according to the servlet 2.3 spec it says

SRV.6.2.4 Configuration of Filters in a Web Application:
"When processing a filter-mapping element using the url-pattern style, the
container must determine whether the url-pattern matches the request URI using
the path mapping rules defined in Chapter SRV,11..."

SRV.11.2 Specification of Mappings:
"- A String beginning with a '/' character and ending with a '/*' postifix is
used for a path mapping
- A String beginning with a '*.' prefix is used as an extension mapping
- A string containing only the '/' character indicates the "default" servlet of
the application. In this case the servlet path is the request URI minus the
context path and the path info is null.
- All other strings are used for exact matches only."


In my web.xml, I have the following filter mapping:

    <filter>
      <filter-name>transcoderFilter</filter-name>
      <filter-class>com.cj.h2w.transcoderFilter</filter-class>
      <init-param>
        <param-name>dir</param-name>
        <param-value>/home/bwoo/workspace/imsld/COMP200_wml</param-value>
      </init-param>
      <init-param>
        <param-name>url</param-name>
        <param-value>http://192.168.2.6:8080/imsld/COMP200</param-value>
      </init-param>
    </filter>
    <filter-mapping>
      <filter-name>transcoderFilter</filter-name>
      <url-pattern>testWml.html</url-pattern>
    </filter-mapping>

However, the filter will not startup and give the following exception:

SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern>
testWml.html in filter mapping at
org.apache.catalina.core.StandardContext.addFilterMap(StandardContext.java:1509)

Tomcat shouldn't have thrown an exception complaining about url-pattern
(according to SRV.11.2, last point).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to