Request a web page

  1. Import the net.rim.blackberry.api.browser.BrowserSession class.
  2. Invoke BrowserSession.displayPage(String url), specifying the URL that contains the web content.

The following sample creates a menu item that displays a web page in the BlackBerry® Browser.

private MenuItem browserItem = 
   new MenuItem(_resources.getString(MENUITEM_BROWSER), 110, 12) 
   public void run() 
      BrowserSession visit = Browser.getDefaultSession();

Was this information helpful? Send us your comments.