File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IP of the Client

 
Karthik Prabu
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Is there any way to find the IP of the Client requesting a servlet other tha the getRemoteHost() and getRemoteAddr() API's.
Thanks
Karthik
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I sure don't know of any - whats wrong with using those ServletRequest methods? The whole idea of ServletRequest is that it encapsulates all the client request information.
Bill
 
Mauro Velasco
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need the Ip and Mac Address from a client, How can I do? with a servlet on iAS.
best regards
Mauro
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17627
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question gets asked over and over again. You can search this forum for some of the detailed explanations, but in short, the IP address isn't reliable for identification puposes. Not only can it be spoofed, but it's often translated in the course of ordinary network operations. Plus there's DHCP.
MAC addresses probably would require a JNI glue class, but they're no more trustworthy. If you want a positive ID, look at some sort of certificate exhange. For most purposes, J2EE's security framework is adequate, however, and it doesn't break if the user's PC dies and they end up having to log in from someone else's box.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic