Hi,

I am in a situation where I want to map a forward filter based on a
servlet and an additional path. The path that is forwarded to looks
something like this:

/servlet/long/path.to/my.jsp

The path info is mapped by the servlet to a JSP in the file system.

My filter declaration looks like this:

    <filter-mapping>
         <filter-name>ResourceTypesListFilter</filter-name>
        <url-pattern>/servlet/long/path.to/my.jsp</url-pattern>
         <dispatcher>FORWARD</dispatcher>
    </filter-mapping>

This filter works ok if I omit the dispatcher-node and send a redirect
but does not work for forwards. This is what is logged when I enable
debug-logging for ApplicationDispatcher:

DEBUG [ationDispatcher: 185] servletPath=/servlet,
pathInfo=/long/path.to/my.jsp, queryString=null, name=null
DEBUG [ationDispatcher: 371]  Path Based Forward

The following mapping does work but is too general:

    <filter-mapping>
         <filter-name>ResourceTypesListFilter</filter-name>
        <url-pattern>/servlet/*</url-pattern>
         <dispatcher>FORWARD</dispatcher>
    </filter-mapping>

Is a mapping containing a path info not supported for forwards?

I tested this on Tomcat apache-tomcat-5.5.26 as well as
apache-tomcat-6.0.13, my webapp is 2.4.

Regards
Flo


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to