-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kris,

On 4/22/2010 4:48 PM, Kris Schneider wrote:
> On Thu, Apr 22, 2010 at 4:31 PM, Christopher Schultz
> <ch...@christopherschultz.net> wrote:
>
>> The following filter works as expected on Tomcat 6.0.26 (some changes
>> were required to make it actually work... my off-the-cuff implementation
>> was lacking a few details).
>
> For reference, here's the snippet from the Servlet 2.5 Spec:
> 
> SRV.8.2 Using a Request Dispatcher
> 
> To use a request dispatcher, a servlet calls either the include method
> or forward method of the RequestDispatcher interface. The parameters
> to these methods can be either the request and response arguments that
> were passed in via the service method of the javax.servlet interface,
> or instances of subclasses of the request and response wrapper classes
> that were introduced for version 2.3 of the specification. In the
> latter case, the wrapper instances must wrap the request or response
> objects that the container passed into the service method.
> 
> But...the proxy is created prior to entering a servlet's service
> method

Yes, but there's nothing stopping me from placing the filter so that it
only wraps FORWARD requests and violating the specification. I'll try
that: I'm sure it'll still work.

> so it may well appear to be the "original" request for the
> purposes of creating and validating a dispatcher and its parameters...

It probably doesn't matter: there's no real value in enforcing this
particular requirement of the specification, so I'd be surprised if
anyone has bothered to do so.

Yup: adding <dispatcher>FORWARD</dispatcher> to my filter still
intercepts the calls without complaint. With a Servlet 2.3 DOCTYPE to boot.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvQuwwACgkQ9CaO5/Lv0PAH+ACdHvyK0sJoaDQ1qIbnWA5eD9c8
sccAoL4TyPUWAcvzXTE06vha3QFYUK4s
=EehI
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to