Try looking at the Accept header. That should tell you if the browser
accepts HTML or WML, maybe. That with a combination of User-Agent checks
should be able to help you...

Donie


 -----Original Message-----
From:   Turner, John [mailto:[EMAIL PROTECTED]] 
Sent:   July 25, 2002 14:14
To:     'Tomcat Users List'
Subject:        RE: WML or HTML detection


Assuming "HttpServletRequest request":

String clientBrowser = request.getHeader("User-Agent");
String clientReferer = request.getHeader("Referer");
String clientIP = request.getRemoteAddr();

John Turner
[EMAIL PROTECTED]


-----Original Message-----
From: David Oxley [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 25, 2002 8:37 AM
To: 'Tomcat Users List'
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

 

Thanks.

Dave


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

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

Reply via email to