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: Wrap an HttpServletRequest (fwd)
Date Wed, 14 Nov 2001 17:40:20 GMT
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 <craigmcc@apache.org>
Reply-To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
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 <diegodelrio@hotmail.com>
> Reply-To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> To: tomcat-dev@jakarta.apache.org
> 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:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message