-1

I want to know the browser which was used to hit the service deployed on tomcat server. Does tomcat maintains a log of such information? If not, then is there anything we can do to know such information.

rohit27kr
  • 13
  • 3
  • Possible duplicate of [How can I get client infomation such as OS and browser](http://stackoverflow.com/questions/1326928/how-can-i-get-client-infomation-such-as-os-and-browser) – Alastair McCormack Dec 08 '16 at 11:59

1 Answers1

0

You can extract this information from the HttpServletRequest object in runtime and extract it to your logs by yourself (without being depended on your servlet container):

String browserDetails = request.getHeader("User-Agent");

For further information take a look at:

UserAgent

List of HTTP header fields

Shmulik Klein
  • 3,754
  • 19
  • 34