gng
asked on
Obtaining a client IP address in a JSP
Has anyone any idea on the way to get the client IP address when running a Java Server Page (JSP) ? I've looked at the java.net.InetAddress class and it looks good, but all I get is the server's IP address. The solution musyt work for both IE and Netscape.
Thanks in advance !
Thanks in advance !
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Hello Terajiv,
The request object is an instance of HttpServletRequest. HttpServletRequest extends ServletRequest. The getRemoteAddr() method belongs to ServletRequest.
Bertrand
The request object is an instance of HttpServletRequest. HttpServletRequest extends ServletRequest. The getRemoteAddr() method belongs to ServletRequest.
Bertrand
Thanx fontaine...
can u pl. tell me this method belongs to which class ?