All,
I have a
servlet (call it Servlet A) that once called opens an Http Connection on another server with another servlet (call it Servlet B). This is done using java.net.HttpURLConnection.
The URL for Servlet B actually points to a load balancer, so my request gets redirected to the appropriate host.
My question is as follows: is there a way for Servlet A to get the host or ip to which it gets redirected?
Let me give an example:
1) Servlet A opens a connection to
http://www.example.com/checkExample 2)
www.example.com is the host name of load balancer. It redirects the request to
http://www.redirectexample.com/checkExample Is there a way for Servlet A to recognize/figure out the redirect URL:
www.redirectexample.com? Thanks,
Marwan
SCJP5, SCWCD5
[ June 09, 2008: Message edited by: Marwan Oweis ]