Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Visitor
Posts: 1
Registered: ‎05-08-2010
My Device: curve 8900
My Carrier: developer

how to call a jsp page from midlet with help of httpconnection and get return bollean value true or false

hiiiiiiiiiiiiii....

   

                       i m new in j2me. i have a midlet login form which send login values to jsp page which check values are correct or not and return true or false in hidden varaible. i have to read these true or false values and open another midlet according to true or false return. how can i do this.

 

 

thanks..............

New Member
Posts: 1
Registered: ‎05-13-2010
My Device: 9700
My Carrier: unknown

Re: how to call a jsp page from midlet with help of httpconnection and get return bollean value true or false

you can use java.io.connector.open('your jsp url') method

through wifi you have to add a suffix ';deviceside=true;interface=wifi' to you url ,

something like 'http://www.yourdomain.com;deviceside=true;interface=wifi'

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to call a jsp page from midlet with help of httpconnection and get return Boolean value true or false

Welcome to both of you. Smiley Happy

 

There are two parts to this question:

 

a) Getting an http connection working

b) setting the connection string so that the http connection is passed through the correct path to your Server.

 

a) Involves the use of Connector and HttpConnection classes.  This is a bit complicated, but this code works in both Midlets and RIMlets, so you can used the code that came from httpdemo in your Midlet.  There is also plenty of other sample code around, I would look at the documentation in the RIM API for HttpConnection for example.  Or you pick up code off the web that works on other platforms.  These connection classes are standard for J2ME.  Rim has come extensions, but nothing you need at this stage.

 

b) This code may well work in the SImulator, but you need to get it working on the device and that is a different problem.  I would recommend that you review the network sticky Thread on this forum to look at the problems and issues.  I would especially recommend the RIM documentation listed in Required Reading.

 

But concentrate on (a) first. 

 

Good luck.