I need to detect whether a request to a website is coming from desktop or mobile or tablet and then take 3 different actions accordingly. for example if request is coming from desktop , i take action 1, if request is coming from mobile , i take action 2 and if request comes from tablet then i take action 3.
I need to do this on server side using java.
Thanks.