my dog learned polymorphism
The moose likes Servlets and the fly likes Detect OS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Detect OS" Watch "Detect OS" New topic

Detect OS

Dan Parsons
Ranch Hand

Joined: May 30, 2007
Posts: 70
I have done browser sniffer using servlet in the past.
Now I want to detect OS using Servlet but I keep getting OS of the Web Server that is hosting my Tomcat container:

Anyway I can detect the client OS using server side Java instead of client side JavaScript?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10840

How about
On my machine I get
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: Detect OS
It's not a secret anymore!