Google News
logo
Java Servlets - Interview Questions
How do servlets get more information about client?
The ServletRequest interface defines the following methods to get more information about the client or the last proxy that send the request.
 
getRemoteAddr() : Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.
 
getRemoteHost() : Returns the fully qualified name of the client or the last proxy that sent the request.
 
getRemotePort() : Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.
 
HttpServletRequest interface that extends from ServletRequest interface inherits above methods.
Advertisement