On Fri, 5 Apr 2002, Tim Moore wrote:

> >
> > One potential gotcha, especially if you like MVC
> > architectures like the one Struts advocates -- filters are
> > only invoked on the original request, not on
> > RequestDispatcher.forward() methods.  In retrospect, that
> > probably wasn't the best approach for *our* purposes, but we
> > have to live with it for now.
>
> If that wasn't true, though, you wouldn't be able to map a filter to /*
> right?

Well, it all depends on what semantics would have been selected.

For example, it would have been possible to say "all matching filters are
invoked on either the original request or on a RequestDispatcher call".
Among other things, this would mean a filter mapped to "/*" would get
invoked twice if the original servlet did a RequestDispatcher.forward()
call, and potentially lots of times if the original servlet does a bunch
of RequestDispatcher.include() calls.

Other possibile semantics also exist (and are being looked at in Servlet
2.4).

Craig


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

Reply via email to