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