We have a Java based application where in we want to detect the device type(mobile or desktop) for the device that is sending the request.
How is it possible?
You can check the User-Agent HTTP header on the HttpServletRequest object.
User-Agent
HttpServletRequest
Ref: http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#user-agent