Hi,
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
wrapper.


Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Steve Cheng [mailto:[EMAIL PROTECTED]
>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
to
>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?
>
>Thanks,
>steve
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to