tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Filters and RequestDispatchers
Date Thu, 12 Sep 2002 00:20:05 GMT


On Wed, 11 Sep 2002, Tim Funk wrote:

> Date: Wed, 11 Sep 2002 18:49:50 -0400
> From: Tim Funk <funkman@joedog.org>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> Subject: Re: Filters and RequestDispatchers
>
> Where in the 2.3 spec is this? When using Weblogic 6 - I was getting the
> opposite behavior. I guess their interpretation of forward() means the
> filter chain gets processed again.
>

In Servlet 2.3, Chapter 6 describes filters.  The behavioral stuff is in
Section 6.2.4 -- especially on page 48 where it talks about:

  "This requirement means that the container, when receiving
  an incoming request:"

and goes on to describe how you select the filters that correspond to the
request.

In the DTD comments about <filter-mapping>, you see something similar:

  "The container uses the filter-mapping declarations to
  decide which filters apply to a request, and in what order."

Filters and RequestDispatchers are mentioned together exactly zero times
-- an argument that they apply to forwards as well seems very tenuous.

This becomes even clearer when you consider the discussions in the JSR-154
expert group, and the conclusion that applications could use the
*optional* behavior to do this, so it was added (see the new Section 6.2.5
in the Servlet 2.4 proposed final draft spec).

Craig



> Craig R. McClanahan wrote:
> >
> > On 11 Sep 2002, Eric Hollander wrote:
> >
> >
> >>Date: 11 Sep 2002 12:06:41 -1000
> >>From: Eric Hollander <hh@mobile.mp>
> >>Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> >>To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> >>Subject: Filters and RequestDispatchers
> >>
> >>>>From what I understand, if I have a filter which does a
> >>RequestDispatcher.forward() to some other resource, no filters are
> >>applied when that other resource is generated.  Is this correct?  It
> >>will make a difference in how I'm designing my web app.
> >
> >
> > For servlet 2.3, filters are *not* applied on RequestDispatcher.forward()
> > or RequestDispatcher.include() calls.
> >
> > For servlet 2.4, you will have the option to ask for filters to be invoked
> > on these calls.
> >
> >
> >>Thanks
> >
> >
> > Craig
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message