I want to know the default client gateway and DNS in jsp. Is there anyway to do this. I found out the IP address, but I also want to know the default gateway or DNS. I did the following to find the ip client.
String ipAddress = request.getHeader("X-FORWARDED-FOR");
String getWay = request.getRemoteAddr() ;
out.println("<br/>IP Address:"+ipAddress+"<br/>");
out.println("<br/>Gateway:"+getWay+"<br/>");
source
share