IMO, it's the other way around.

"user-agent" is the real HTTP name of the variable. It's the variable name
that's acually used in the GET request.
"HTTP_USER_AGENT" is what CGI makes from it. Or what's used in the Apache
configuration.

So, it's in fact the cgi variables that should be documented in terms of
http headers.
Anyway, in Jason Hunter's servlet book, there's a list of these CGI
variables and their servlet counterparts.

Geert Van Damme


> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Neal Cabage
> Sent: zondag 20 augustus 2000 8:30
> To: [EMAIL PROTECTED]
> Subject: Re: detecting browser type
>
>
> I found this thread buried in my inbox from a while back and am
> curious ...
>
> someone mentioned that the follow would work to retrieve the user agent
> info:
>
> request.getHeader("user-agent")
>
> So I tested in and it does in fact work.  BUT, isn't the environmental
> variable actually called "HTTP_USER_AGENT"?  I tried retrieving
> the info by
> that name using the same method but had no success.  I then
> looked for other
> methods in both the request and other classes that would allow me to
> retrieve the variable by this name but found nothing.
>
> This all brings me to a question:  How would one know what to
> call these env
> vars if not by their names? I've found no documentation to this
> effect. And,
> is there a way to retrieve this information using the actuall env
> var names?
>
> Thanks!
> Neal
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to