1

i want to identify a client machine uniquely from servlet.

Basically my application is about to take visitors detail. In my application i have offers for a user who visited me first time. In this scenario, i need to get information of client's machine so that if get back on site then my application can recognize that from this machine client is already visited.

I am using JAVA SERVLET.

Any point regarding this scenario will appreciated.

Thanks in advance.

Swap L
  • 698
  • 3
  • 12
  • 27
  • 1
    Check out this http://stackoverflow.com/questions/839973/how-to-get-a-clients-mac-address-from-httpservlet, I think it's exactly what you need. – Dropout Nov 15 '13 at 12:29
  • 1
    This might answer your question? http://stackoverflow.com/questions/839973/how-to-get-a-clients-mac-address-from-httpservlet – Hiny Nov 15 '13 at 12:29
  • Using just servlets, I think the best you can hope for is using the IP address combined with some cookie. – MadConan Nov 15 '13 at 12:56

1 Answers1

4

Using only Servlet technologies, it is impossible to get MAC addresses. MAC address detection need software running on the client machine - a browser plugin, ActiveX control, JavaScript script or something like that. It would also most likely trigger security warnings, if the browser tried to access such information.

Cookies should be used as a first method of returning visitor detection. It is quite easy to clear them or use a different browser, but the majority of internet users don't think about such things.

Going for MAC addresses seems needlessly invasive to me.

Tarmo R
  • 1,123
  • 7
  • 15
  • from chrome extension is it possible??? – Swap L Nov 15 '13 at 12:40
  • if you have any better suggestion instead of mac address ?? – Swap L Nov 15 '13 at 12:42
  • Are cookies not enough? That's the standard way of doing it and supported fully by the Servlet API. – Tarmo R Nov 15 '13 at 12:48
  • what if client clear his all browser history ?? – Swap L Nov 15 '13 at 12:50
  • 1
    That is something You can't do anything about. Most users won't clear the history however. As I said - in my highly personal opinion - going for client's hardware signature for this kind of detection is too much. No web page should have access to information about the client's hardware. All methods of detecting such things will trigger security warnings which users may or may not agree to. If they don't agree to the check, You're still left with nothing. – Tarmo R Nov 15 '13 at 12:54