getRemoteAddr() of HTTPSERVLET.
This will give you the IP of the client but one thing, if client is using proxy, it may not give you the exact IP but the proxy that is being used by client.

If...