On Thu, 25 Jul 2002, David Oxley wrote:

> Date: Thu, 25 Jul 2002 13:37:01 +0100
> From: David Oxley <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: WML or HTML detection
>
> >From a servlet how can you detect what should be output from the type of
> client that sent the request. i.e. If a WAP phone accesses a servlet then it
> outputs WML or if a Web Browser accesses the same servlet then HTML is
> output
>

String userAgent = request.getHeader("user-agent");

You can use this value to determine what the client device (or browser)
is, including the version number.

>
>
> Thanks.
>
> Dave
>
>

Craig



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to