struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Graf-Waczenski <>
Subject Re: How to get the host name if proxy is configured
Date Mon, 23 Nov 2009 11:33:38 GMT
Mageshwaran schrieb:
> Hi All,
> In my application, am using  request.getRemoteHost() to get the host 
> name where the client is running. But it is returning the proxy 
> address if configured instead of host address/ host name. Can any one 
> help me to solve this issue?
> Thanks in Advance,
> Magesh.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Short answer: You can't. A proxy by definition executes the request on
behalf of the client and can therefore completely mask the actual client
host address. There are, however, non-RFC-complient request headers that
you might query:


But be warned: Many proxies don't supply this information correctly, so
you have to live with what getRemoteHost() gives you.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message