Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

response.sendRedirect() to different server

843840Apr 19 2002 — edited Jul 25 2002
hi all,

I have a servlet running on one application server that process user login and redirect to another application server based on information retrieved in the servlet. I thought it'd be as simple as calling response.sendRedirect() with the URL of the redirect destination server - however it always end up being redirected to the same server.

For example, the login servlet is running on Server1, after login process is finished I want the servlet to redirect user to a servlet called TargetServlet on Server2. However after calling response.sendRedirect on Server1, the URL it redirects to is http://Server1/TargetServlet instead of http://Server2/TargetServlet. I know requestDispatcher.forward() can only be use within the same JVM. Does that apply to response.sendRedirect?

Thank you,
Makoto
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2002
Added on Apr 19 2002
5 comments
549 views