On Thu, 19 Jul 2001 10:32:57 +0100, Sam Newman <[EMAIL PROTECTED]> wrote:
>I wanted to do something similar, and came to the conclusion thayt you
>cannot add parameters to a post using the standard redirection. If you have
>full control over servlet #2 however, you could simply store the extra
>fields in an attribute and then forward the page from servlet #1 to servlet
>#2....
I think there is way to pass additional parameters to servlet #2 using the
forward/include.
As per the specs 2.3PFD2 section SRV.8.1.1
<quote>
The ServletContext and ServletRequest methods that create RequestDispatcher
objets using path information allow the optional attachment of query string
information to the path. For example, a Developer may obtain a RequestDispatcher by
using the following code:
String path = �/raisons.jsp?orderno=5�;
RequestDispatcher rd = context.getRequestDispatcher(path);
rd.include(request, response);
Parameters specified in the query string used to create the requestDispatcher take
precedence over other parameters of the same name passed to the included servlet. The
parameters associated with a RequestDispatcher are scoped to apply only for the
duration of the include or forward call.
</quote>
As far as the request is GET/POST is concerned, there is no difference in the way the
parameters are obtained. So I think this should work even for POST requests.
Regds,
Gokul
>
>sam
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html