• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I get the IP address and Computer Name through Servlets (Prortocal Manager) ??

 
Sanjay Bahrani
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Can I get the IP address and the Computer Name using servlets.
For eg. I am Sitting on the server and the requests come from a client(Using Servlets) can I get the computer name & IP address of a client who is sending me the request . If yes Plz. reply me.
Thankz.
 
Bosun Bello
Ranch Hand
Posts: 1510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the methods getRequestURI and get to return the part the URL after the host and port. I am not a sure if there is a method to get the computer name.
Bosun
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sanjay,
Please check out this discussion. http://www.javaranch.com/ubb/Forum7/HTML/002047.html
regds
maha anna
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic