View Single Post
  (#1 (permalink)) Old
ahmadgee Offline
Thumbs Must Hurt
 
Posts: 51
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Default HTTP Error 400:Bad Request - 05-09-2008, 09:39 AM

Hi every body,

I have writen the code the display the contents of html string using BrowserSession in simulator But I got the following error

HTTP Error 400:Bad Request
The server could not understand the page request, or was unable to process it for some reasons. Please try loading a different page.

Please help me to correct this error.
Code:
public class WebLauncher1 extends UiApplication
{    
    public static void main(String[] args)
    {
        WebLauncher1 theApp = new WebLauncher1();
        theApp.enterEventDispatcher();
    }

    public WebLauncher1()
    {
        BrowserSession browserSession = Browser.getDefaultSession();
        String htmlString="<h1>My First Heading </h1>";
        browserSession.displayPage(htmlString);
        System.exit(0);
    }    
}

Last edited by ahmadgee : 05-09-2008 at 09:40 AM.
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!