• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

IP of the Client

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 25777
184
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic