Thanks to all for the suggestions,
It rings me a bell.
The .getHeader method it's good.
But, for example, for checking if some substring it's at the 'User-Agent'
header, I would use the String method .regionMatches. �it's good this one or
there is some other more appropiate? (I can't see any other better at the
API String documentation)
Regards,
Oskar.
> -----Mensaje original-----
> De: Christopher K. St. John [SMTP:[EMAIL PROTECTED]]
> Enviado el: mi�rcoles 12 de septiembre de 2001 17:49
> Para: [EMAIL PROTECTED]
> Asunto: Re: detecting clients device
>
> "Perez, Oscar" wrote:
> >
> > Is there any method to detect the client's device
> > (or browser)?
> >
>
> As other posts mention, there's normally an HTTP
> header called "User-Agent" that indicates the kind
> of brower.
>
> You can access that header in a servlet by
> calling HttpServletRequest.getHeader("User-Agent"),
> and then take appropriate action based on the
> return value.
>
> http://www.browserwatch.com
>
> has a list of user-agent header values you can
> check out ("Stats Station") There are more than
> you might expect. Most people use substrings to
> match whole sets of browsers rather than trying
> to identify each and every version of every one.
>
> Sometimes users turn off the user-agent header,
> and some browsers allow you to reset it to
> different values (mainly to work around brain
> dead web sites that think all browsers are
> netscape or ie).
>
> So always have a fallback, and make sure you
> don't deny access to people use alternative
> browsers. (It's not just a marketing issue,
> some vision-impaired people use text-only
> browsers with screen readers)
>
>
> --
> Christopher St. John [EMAIL PROTECTED]
> DistribuTopia http://www.distributopia.com
>
> __________________________________________________________________________
> _
> 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