tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
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.


---------- Forwarded message ----------
Date: Wed, 14 Nov 2001 09:09:58 -0800 (PST)
From: Craig R. McClanahan <>
Reply-To: Tomcat Developers List <>
To: Tomcat Developers List <>
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 <>
> Reply-To: Tomcat Developers List <>
> To:
> 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:   <>
For additional commands, e-mail: <>

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message