java-melwuithtml-components

Jar file for HttpRequestHandler in lwuit in j2me


I need to open a web page in j2me emulator. As I have the flow that I can do this by using HTMLComponent. But I can not use this HttpRequestHandler class to create handler in j2me in Lwuit can anybody say me what is missing in my j2me? If is there any JAR file to use it then give me suggestion to make use of it. Then I have also tried DocumentRequestHandler in the same instead of HttpRequestHandler But it show me emulator that "Error in connecting stream"

My code is:

         DocumentRequestHandler handler=new DocumentRequestHandler() {

        public InputStream resourceRequested(DocumentInfo di) {
          return null;
            //           throw new UnsupportedOperationException("Not supported yet.");
        }
    };
 HTMLComponent htmlc=new HTMLComponent(handler);
 htmlc.setPage("http://facebook.com");
 addComponent(htmlc);
 show();

In this code what i need to return in DocumentRequestHandler?


Solution

  • The class you are looking for is available at LWUITBrowser sample application and can be checked out from the LWUIT SVN under MIDP/applications.