J2ME HTTP Server?

Discussion in 'Java' started by Robert Mark Bram, Apr 11, 2004.

  1. Hi All!

    Using WTK2.0 or WTK2.1, how can we create a HTTP Server?

    When I look at the Javadocs for javax.microedition.io.HttpConnection, I see
    that you can open a url for reading.. but I don't see how you can wait to
    receive an incoming connection. I was thinking this would be the way to do
    it - it seems compatible with the SMS and Socket connection paradigms.

    Any advice would be most welcome!

    Rob
    :)
     
    Robert Mark Bram, Apr 11, 2004
    #1
    1. Advertising

  2. "Robert Mark Bram" <none> wrote:

    > Using WTK2.0 or WTK2.1, how can we create a HTTP Server?
    >
    > When I look at the Javadocs for javax.microedition.io.HttpConnection, I
    > see that you can open a url for reading.. but I don't see how you can wait
    > to receive an incoming connection. I was thinking this would be the way to
    > do it - it seems compatible with the SMS and Socket connection paradigms.


    HttpConnection is used to create *client* connections to an HTTP server, not
    for receiving connections. If you want to act as an HTTP (or any protocol)
    server, you have to open ServerSocketConnection (assuming such is supported
    on the device in question, since it's not a required connection type) and
    handle the protocol elements yourself.

    --
    Darryl L. Pierce <>
    Visit the Infobahn Offramp - <http://mypage.org/mcpierce>
    "What do you care what other people think, Mr. Feynman?"
     
    Darryl L. Pierce, Apr 11, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page