I need help for how to get client ip address from Public ip server.
String ipAddress = request.getHeader("X-FORWARDED-FOR");
if(ipAddress == null)
ipAddress = request.getRemoteAddr();
I had use this code.This code is not working Public ip server.This code get only gate way ip only
Plz give the solution for this.