tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Is it possible to modify request parameter?
Date Mon, 02 Aug 2004 13:29:29 GMT

Yes.  Use the HttpServletRequestWrapper, and modify the
getParameter/getAttribute/getHeader/getQueryString methods as you need.
You will need a Filter to go along with this, mapped to /servlet2 in
your example, which will intercept the request and wrap it with your

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Steve Cheng []
>Sent: Monday, August 02, 2004 12:27 AM
>To: Tomcat Users List
>Subject: Is it possible to modify request parameter?
>Dear all,
>The question may be not a TC specific one.
>I am using RequestDispatcher to forward a request object from Servlet1
>Servlet2 as followings.
>protected void doPost(HttpServletRequest request, HttpServletResponse
>response) throws ServletException, IOException {
>   RequestDispatcher rd = context.getRequestDispatcher("/Servlet2");
>   rd.forward(request, response);
>Is it possible to add or modify the parameters of the request object?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message