Collect the IP Address of a User

The end user accessing your online application might be a home user or might be accessing it from their corporate network. In case of latter category of users, chances are that they might be "hidden" behind a proxy server. As a result, the way you will collect the IP address of an end user who is accessing your online application from behind a proxy will be different from the user who accesses it directly from home.
aatest
2115310
The end user accessing your online application might be a home user or might be accessing it from their corporate network. In case of latter category of users, chances are that they might be "hidden" behind a proxy server. As a result, the way you will collect the IP address of an end user who is accessing your online application from behind a proxy will be different from the user who accesses it directly from home.
If the End User is Accessing Your Application Directly
If the end user is accessing your application directly, then you can use the getRemoteAddr() method of the HttpServletRequest interface in your JSP. This method returns a string that contains the IP address of the client that sent the request.