in Advanced 

Question preview

HomeQuestion preview:
Log in

How to detect browser type and version in JSP or Servlet

How can I detect the browser type and version in JSP file or Servlet? I'm mostly interested in FireFox and Internet Explorer versions.
Do you know someone who could answer? Ask him for help
Answers: 1
Sort by: date rating
image xpert
16:33/20.05.2008
3.2 from possible 5 with 5 votes
<%= request.getHeader("User-Agent") %>



When you request from FireFox above statement will result in:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Then you can parse and extract info you need.
Vote:
Please vote! Your opinion matters!
If you haven't found what you've looking for, post a question
Ask question
| Home | Hall of fame | Registration | Log in | Terms of service | Privacy policy | Help | Contacts | RSS |