This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
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


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "how to connect Midlet with Servlet" Watch "how to connect Midlet with Servlet" New topic
Author

how to connect Midlet with Servlet

Harish Chandra Durgapal
Greenhorn

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,
Harish.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17271
    
    6

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.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
 
subject: how to connect Midlet with Servlet
 
jQuery in Action, 3rd edition