This following code shows how to obtain the IP address of the user that calls the server. The Request object has a few methods to get information about the call and about the caller, and one of them is named getRemoteAddr() which returns the IP address of the calling computer. The below example will print the IP address of the user on a blank html-page.
About Java and it's related concepts..