BlackBerry Forums Support Community

BlackBerry Forums Support Community (
-   Developer Forum (
-   -   HTTP Error 400:Bad Request (

ahmadgee 05-09-2008 09:39 AM

HTTP Error 400:Bad Request
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.

public class WebLauncher1 extends UiApplication
    public static void main(String[] args)
        WebLauncher1 theApp = new WebLauncher1();

    public WebLauncher1()
        BrowserSession browserSession = Browser.getDefaultSession();
        String htmlString="<h1>My First Heading </h1>";

goulamass 05-09-2008 11:18 AM

In fact your program try to connect to the url given by htmlString.

But it's not a valid URL.

Ivanov 05-12-2008 02:42 PM

look here for displaying raw HTML:
How To - Invoke the browser with raw HTML

All times are GMT -5. The time now is 01:10 PM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.