tomcat-users mailing list archives

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

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:stevecheng@schednet.com]
>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: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message