"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