if the users are behind a proxy use the following approach:

String endIp = req.getRemoteAddr();
String endIpfoward = req.getHeader("X-Forwarded-For");
//the user is behind a proxy
if (endIpfoward != null) {
        endIp = endIpfoward;
}

so you will get the real ip address anyway, even if it's behind a proxy...

Emerson



Tim Funk wrote:
HttpServletRequest.getRemoteAddr()

-Tim


Jarl Skogsholm wrote:

How do I get the user IP address?  I only get the IP of the server.

Thanks


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--
Emerson Cargnin
Analista de Sistemas - Gerente Regional - Tubar�o
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to