×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    20

    https connection in J2ME?

    I want to execute a url like this
    https://www.abc.com/send.asp?message=hello
    in the midp, is it possible?
    The url return 1 or 0 for success or fail

    Also, is it possible to simulate the execution of the above url in Wireless Tookit 2.0?

    Regards

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    United Kingdom
    Posts
    49
    I've not tried comms yet, but you could try something like:

    Code:
    import java.io.*;
    import javax.microedition.io.*;
    
    	InputStream s;
    
    	try
    	{
    		s = Connector.openInputStream("https://www.abc.com/send.asp?message=hello");
    	}
    	catch (IOException e)
    	{
    	}

  3. #3
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    Support for HTTPS is required in MIDP-2.0, but optional in MIDP-1.0 (for optional, read not supported by most Nokias!). Only HTTP is required for MIDP-1.0.

    If you use HTTP from most emulators, the emulator will attempt to make an HTTP connection from your computer. If you're running a web server (say, Appache or IIS) you can change the start of the URL to "http://127.0.0.1/..." and connect to your local web server. (Or, if you're connected to the internet, you should be able to connect directly to the real server.)

    Graham.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×