public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
// Get client's IP address
String addr = req.getRemoteAddr(); // 110.103.113.113
// Get client's hostname
String host = req.getRemoteHost(); //java.com
}
Java,Tomcat,Servlets,JSP,JSF and other programming stuff