Hehe, System.getenv() wouldn't do you much good anyways, this isn't CGI :)
The user agent info is a header sent by the client by the name of
"user-agent", it's a hack in the CGI spec to rename it,
so, in  a servlet you would do:

String agent = request.getHeader("user-agent");
Easy enough? (CGI  provides nothing more than this either) :)

/Magnus Stenman
Orion WebServer - http://orion.evermind.net

-----Original Message-----
From:   A mailing list for discussion about Sun Microsystem's Java
Servlet API Technology. [mailto:[EMAIL PROTECTED]] On Behalf Of
John Swanteson
Sent:   den 8 maj 1999 04:53
To:     [EMAIL PROTECTED]
Subject:        CGI Environment Variables

Hello,

I have been developing servlets for some time and have come accross the
need for an environment variable not provided
with a get... method (i.e. getQueryString) in the HTTPRequest object.  I
would like to obtain HTTP_USER_AGENT so I know the
browser the user is using.  I know I can use the System.getenv method but I
don't want to use a depreciated method.

Does the Servlet API provide a general way of accessing a specific web
server/browsers environment variables or do we
only have access to what they provide has methods in the Request object?

I would appreciate help.

Thank you in advance.

___________________________________________________________________________
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

___________________________________________________________________________
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

Reply via email to