Determining whether a BlackBerry or desktop is accessing a Web site

Determining whether a BlackBerry or desktop is accessing a Web site

How can I use my Lotus Domino server to detect whether a BlackBerry or desktop computer user is accessing a Web site?

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

This answer comes from my co-presenter at Lotusphere 2007, Rana Puri. Thanks, Rana!

This may be done by examining the HTTP header information of the incoming request. Since you can code your Lotus Domino applications by using either Java or Formula language code, here are code snippets for each example:

In Java code:

String source = request.getHeader("user-agent"); 
(Where 'request' is an instance of 
'HttpServletRequest')

In Formula language code:

@If(@BrowserInfo("BrowserType")=
"Netscape";"NS";"IE";"BlackBerry")

In order to find out the exact contents of the HTTP header, use an HTTP proxy such as TCPMon to record the HTTP traffic.

Do you have comments on this Ask the Expert Q&A? Let us know.

Related information from SearchDomino.com:

  • Expert Advice: Stop spam on BlackBerry mobile devices
  • Learning Guide: Wireless Integration Development
  • Reference Center: Lotus Notes Domino and mobile devices
  • This was first published in December 2007