This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes need MAC address of client machine in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "need MAC address of client machine in servlet" Watch "need MAC address of client machine in servlet" New topic
Author

need MAC address of client machine in servlet

Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Hi guys,

I need a feature in my web application. I want to restrict user login on the basis of IP address and MAC address. To achieve this feature i am able to find LAN IP address and i searched the internet to find MAC address code. But i am unable to get any help. Can you guys please show me a way or workaround for the problem.



Thanks in advance
Jagdeep
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20048
    
  30

The MAC address isn't sent with the requests*. It's only available on the client machine. That means that the server can't get to it.

* Well, apart from perhaps DHCP requests, but that's not what we're talking about here.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Rob Spoor wrote:The MAC address isn't sent with the requests*. It's only available on the client machine. That means that the server can't get to it.

* Well, apart from perhaps DHCP requests, but that's not what we're talking about here.






Hey Rob, Could you please suggest me some workaround for this.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20048
    
  30

I can't think of any.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need MAC address of client machine in servlet
 
It's not a secret anymore!