William Yeo wrote:

> Hi all,
>         Is there a way to use the RequestDispatch forward(request, response) method
> to another page at another server (i.e. not on the same server and root as
> the servlets)?

No.  RequestDispatcher only works within the same webapp.

> I am trying to display a html page to the browser at another
> server. Can anyone answer my question. Cheers!
>

You have two basic choices:

* Use a response.sendRedirect() to redirect the user to the other server

* Use a java.net.URLConnection to read the response of the other server
  into your servlet, and copy the response content to your own response.

>
> Regards
> William
>

Craig McClanahan

___________________________________________________________________________
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