Look at the headers in the request object. I don't know if UserAgent will
tell you enough or not.

----- Original Message -----
From: "P.J. Tenn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 17, 2000 12:26 PM
Subject: Web Browser detection in JSP


> Hello,
>
> I am surprised this wasn't already have been posted and answered, but I
> searched the archives of this mailing list and could not find any info on
> this ...
>
> At any rate, is there a way to detect whether someone is using Netscape or
> IE using JSP?  I know this can be done easily in JavaScript using code
along
> the lines of:
>
> var browser = navigator.appName;
> var Nav = (browser == "Netscape");
> var IE = (browser == "Microsoft Internet Explorer);
>
> However, I need to set boolean variables within the scriptlet <% ... %>
tags
> based on whether Netscape or IE is being used.
> Thanks in advance!!!
>
> P.J.
>
>
===========================================================================
> 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