aspose file tools*
The moose likes Servlets and the fly likes request.getHeader( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "request.getHeader("User-Agent")" Watch "request.getHeader("User-Agent")" New topic


Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
I was playing around with this, and noticed that in most cases it determines the browser type as well as the operating system it's running on. Is there a way we can determine dynamically the operating system of the user? I suppose I could turn it into a string and try to find certain substrings, but I was wondering if there was a method to determine the operating system. Thanks.
Tony Alicea

Joined: Jan 30, 2000
Posts: 3222
I doubt that there's a servlet request method that returns the OS.
In JavaScript, however, there is a browser object
that returns "Win32" in my case (WinNT4 SP6).
You can see what "User-Agent" your browser returns in my old page

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
I agree. Here's the link:
subject: request.getHeader("User-Agent")
Similar Threads
Do we need to supply command line search for and book flights?
Determine browser and os of web user?
How to lunch browser
snap shot of web page with JavaScript