The best way to get the client's OS i believe is through Javascript:
This is what I used.
if ((navigator.userAgent.indexOf("WinNT")>-1) ||
(navigator.userAgent.indexOf("Windows NT")>-1))
bOS = "WinNT";
and send the bOS var to your servlet as a param.
The User-Agent may fail in HTTP 1.0 as erik rightly pointed out.
Regards
Rohit Parik
Netweb Software, India
Ph: +91-265-301424
+91-265-314729
Fax: +91-265-314756
email : [EMAIL PROTECTED]
----- Original Message -----
From: erik morton
To: [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 8:30 PM
Subject: Re: Querying Opearting System and version from Browser
use request.getHeader("User-Agent").
Though keep in mind that HTTP 1.0 does not require that this header be
present
so check to see if it is null.
Mohammed Akacem wrote:
> In my Servlet I want to kow which operating system is running on the
> machine I got I request from? how do I get this?
>
> Thanks
> Mohammed
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html