But if I use HttpServletResponse.sendRedirect(String location), I cannot
forward the request to the new servlet as RequestDispatcher.forward()
does. Is there a way to work around this?
Thanks!
Xizhen
Nic Ferrier wrote:
>
> >>> Xizhen Wang <[EMAIL PROTECTED]> 08-May-00 8:44:45 PM >>>
>
> >Hi! Can I use RequestDispatcher.forward() to redirect to
> >another servlet that is located on another web server?
>
> No.
>
> >I found it does not work.
>
> That's because it's not supposed to work.
>
> It is not even supposed to work for redirecting to a servlet inside a
> different servlet-context on the same webserver (as you would know if
> you read the docs).
>
> To redirect to another webserver use:
>
> HttpServletResponse.sendRedirect(String location)
>
> Nic Ferrier
>
> ___________________________________________________________________________
> 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
--
Xizhen
http://www.alladvantage.com/home.asp?refid=ANI887
https://secure.paypal.com/refer/pal=delate%40hotmail.com
___________________________________________________________________________
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