The code snippet below gets the IP address of the client who access the JSP page. You may log the address in database or in log files for later use.


Java Code:
<%
out.print( request.getRemoteAddr() );
out.print( request.getRemoteHost() );
%>