I'm assuming that you're using a RequestDispatcher to forward the
request off. My question is why don't you use a forward response
to the web client? Do something like this:
String targetUri = genUri( request );
response.sendRedirect( targetUri );
Where the "genUri" would create the uri for the redirect. You
could put whatever you want in the uri and do whatever filtering
you want to do. Since with a redirect you're not passing the
same request object around (unlike the RequestDispater.forward)
it seems like it'd solve your problem.
--mikej
-=-----
mike jackson
[EMAIL PROTECTED]
> -----Original Message-----
> From: Scott W. Sadler [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 1:41 PM
> To: tomcat
> Subject: Removing Request Parameters
>
>
> I have the need to remove parameters from a ServletRequest. Specifically
> when I do URL forwarding, I don't want the parameters on the
> initial request
> to conflict with those in the forwarded request.
>
> Unfortunately, the JSP API provides me with no method to remove Request
> parameters (there is no ServletRequest.removeParameter method). In
> addition, Mr. McClanahan seems hell-bent on preventing me from doing so
> short of downcasting the request parameter Map returned from
> ServletRequest.getParameterMap() to an
> org.apache.catalina.util.ParameterMap
> and doing a hacked-up-end-run.
>
> So really, my question is two fold:
>
> 1. Why is there no ServletRequest.removeParameter() method (I assume
> somebody in this forum knows)
> 2. If I really, really want to, how can I either remove all of the
> parameters from a request or initialize/recycle the request object in a
> Struts action before I forward to another URL.
>
> Thanks
>
> Scott W. Sadler - Cisco Systems
>
> ---
> When choosing between two evils, I always like to try the one I've never
> tried before.
> - Mae West (1892-1980)
>
>
>
> --
> To unsubscribe: <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>