This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Detect OS" Watch "Detect OS" New topic
Author

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: 10171
    
    8

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!]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Detect OS
 
Similar Threads
FTP Upload
How to catch org.apache.axis2.AxisFault on server side
run exe in client sid
Is The XSLT Transformation Platform Independent?
detect if javascript is enabled/disabled