The servlet specification does not require that the RequestDispatcher.forward() method 
be able to forward request objects between two
distinct instances of a servlet container. If a vendor chooses, each instance of the 
container may be contained within distinct JVMs. If
this is the case, then there is little chance that a ServletContext in on JVM has any 
clue as to the existence of another ServletContext in
a different JVM.

If you use the response.sendRedirect() method, you will keep all of your parameters 
because you have to specify them in the url:
http://server2.myHost.org/myAppOnServer2/Foo?p1=1&p2=2.........

The browser will make a request to the URL specified in the HTTP response (status 
303??? or is it 302??).

Bo Xu wrote:

> Bartsch Axel wrote:
>
> > Exactly.
> >
> > Thats why I would prefer to use solution 2:
> > within servlet1:
> > instead of forwarding the request (using the RequestDispatcher) send a response 
>using response.sendRedirect(String <url of servlet2>).
> > Then the browser will resend its request to the correct URL of servlet2
> >
> > Will the same parameters included in the browsers original request be resend also 
>in the browsers 'redirect' request?
> >
> > Axel              Lannion/France
> > [...]
>
> Hi :-) I am not sure, from several emails and my work, I think the
> original parameters:
>
> - will be lost after sendRedirect(...)
> - will be "remembered :-)" after RequestDispatcher
>
> if it is wrong, please correct it, thanks :-)
>
> Bo
> May.18, 2001
>
> ___________________________________________________________________________
> 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

--
Erik I Morton
Software Developer
------------------
CommerceHub
http://www.commercehub.com
518-886-0704
21 Corporate Drive
Clifton Park, NY 12065

___________________________________________________________________________
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

Reply via email to