This was asked on TOMCAT-USER also, so I'm forwarding my rely.

Craig

---------- Forwarded message ----------
Date: Wed, 14 Nov 2001 09:09:58 -0800 (PST)
From: Craig R. McClanahan <[EMAIL PROTECTED]>
Reply-To: Tomcat Developers List <[EMAIL PROTECTED]>
To: Tomcat Developers List <[EMAIL PROTECTED]>
Subject: Re: Wrap an HttpServletRequest



On Wed, 14 Nov 2001, Diego del Río wrote:

> Date: Wed, 14 Nov 2001 10:16:16 -0300
> From: Diego del Río <[EMAIL PROTECTED]>
> Reply-To: Tomcat Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Wrap an HttpServletRequest
>
> Is there any way to wrap an HttpServletRequest in Tomcat 3.2.x and then
> forward the wrapped request to anoher servlet?
> We need a 'decorated request' with added functionality, more precisely, we
> need to add 'extra-parameters' to that request and then forward it to
> another servlet that process both the original and the added parameters.

In servlet 2.2 (Tomcat 3.x), it is not legal to wrap the request (or
response) that you pass to a request dispatcher -- the only choice you
have is to add request attributes.

In servlet 2.3 (Tomcat 4.0), it is legal to wrap the request and response,
as long as you subclass the provided wrapper base classes.  You can do
this for both request dispatchers and filters.

> Thanks,
> diego
>

Craig McClanahan


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



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to