Sunday, 24 April 2016

How to find out which client machine is making a request to servlet ?


The ServletRequest class has functions for finding out the IP address or host name of the client machine :

public String getRemoteAddr()
gets the IP address of the client machine.

public String getRemoteHost()
gets the host name of the client machine

No comments:

Post a Comment

Note: only a member of this blog may post a comment.