I am wondering what technique is there to access a web application ( say a servlet ) from a midlet. I have a requirement to develop an end to end java appplication invloving J2EE and J2ME. All is well from the server side, but I ma hitting a blank wall when it comes to using a midlet to get the results from a servlet. The obvous problem is that the servlet is returning html code and my midlet is just dumping the html code on the screen, not interpreting into usable data.
Well yes, when a Midlet uses a URL for an HTTPConnection, wheatever that Servlet sends as a response is what is displayed. It is just a byte array, or makes up a string of data. there is no interpretation of the data, you would need to code that yourself.
Usually the Servlet that a Midlet calls should just return a String of data that you want, not html tags. Again when I say string, I mean a string represented by a byte array.
Sometimes you can return XML and use a J2ME xml tool to read the data.