This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
In my application i need to get the name of the client machine that is making the request. I am using the getRemoteHost method. But it is returning the IP Address of the client. is there any way i can resolve the name of the client machine from that or any other method is there to get the client name.
The servlet API indicates that the container is not required to convert the requestor's IP address into a host name (for the sake of speed) ... In that case, getRemoteHost will return the remote IP instead.
If you desire, you can manually intervene to look up the remote host name if the container has decided not to do so. Here's a code snippet that I use: