jQuery in Action, 3rd edition
The moose likes Java Micro Edition and the fly likes how to connect Midlet with Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "how to connect Midlet with Servlet" Watch "how to connect Midlet with Servlet" New topic

how to connect Midlet with Servlet

Harish Chandra Durgapal

Joined: Mar 01, 2006
Posts: 14
Hi Frndz,
I am a new bee to j2me.I want to fetch records from servlet and show it on mobile in tabular form.??
After browsing the forum I got the basic idea abt the above said topic(how to connect Midlet with Servlet).
Can any one please post the code for midp and servlet in this case.

Thanks in advance,
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Well it really is just two lines of code.

like (HttpConnection)Connector.getConnection("http://www.mysite.com/MySevlet");

then with the HttpConnection get the values back.

I forget if that is 100% correct code, because I am trying to use my memory, and it has been probably about a year since I had to use that code.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link: http://aspose.com/file-tools
subject: how to connect Midlet with Servlet
It's not a secret anymore!