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

> -----Original Message-----
> From: Pierre-Yves Saumont [SMTP:[EMAIL PROTECTED]]
> Sent: vendredi 18 mai 2001 15:01
> To:   [EMAIL PROTECTED]
> Subject:      Re: forward a request from servlet1 in TOMCAT1 to              a 
>servlet2 in TOMCA              T2
>
> You can make a request two servlet2 from servlet1. This is much more work
> because you will have to manage everything yourself (parameters, headers,
> etc), but it works with any two serlvets, even in different domains.
>
> Pierre-Yves
>
> -----Message d'origine-----
> De : A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]De la part de
> Bartsch Axel
> Envoy> � : vendredi 18 mai 2001 14:33
> � : [EMAIL PROTECTED]
> Objet : Re: forward a request from servlet1 in TOMCAT1 to a servlet2 in
> TOMCA T2
>
>
> Thank you,
>
> I am talking about 2 different TOMCAT servlet engine instances.
> 1) Do you have a code example for your proposal?
> 2) What do you think of this solution?:
>    a technique (such as response.sendRedirect()) to cross machines (or
> even cross web apps)
>
>
> Axel               Lannion/France
>
> > -----Original Message-----
> > From: Gokul Singh [SMTP:[EMAIL PROTECTED]]
> > Sent: vendredi 18 mai 2001 06:56
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: forward a request from servlet1 in TOMCAT1 to
> a servlet2 in TOMCA              T2
> >
> > ----- Original Message -----
> > From: "Bartsch Axel" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> >
> > [snipped]
> > > My problem is:
> > > If servlet1 and servlet2, servlet1 and jsp2 are located on 2 different
> > TOMCAT servlet engines the forward does not work.
> > > The RequestDispatcher always expects a path String relative to the root
> of
> > the ServletContext.
> > > Does anybody know a solution?
> >
> > If this is on different contexts on the same engine, then you can look at
> > the method ServletContext.getContext(String uri)
> >
> > If you are talking of another  instance of the servlet engine, then you
> have
> > to use the class java.net.HttpUrlConnection to establish connection to the
> > required uri on that server.
> >
> > Regds,
> > Gokul
> >
> >
> > >
> > > Axel   Lannion/France
> > >
> >
> >
> ___________________________________________________________________________
> > 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
>
> ___________________________________________________________________________
> 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
>
> ___________________________________________________________________________
> 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

___________________________________________________________________________
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