×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    help: forcing use of proxy in j2me and getting value of gateway IP address

    hi everyone,

    #1
    Has anyone tried forcing the use of a proxy for a midlet? If so how did you do this? I was able to connect to a url through the emulator (ktoolbar) by changing the proxy settings under the edit-->preferences on ktoolbar but I want to make sure that my midlet enforces the use of a proxy to connect to a http url (so that I'll know it still uses the proxy even if it is already using a real java-enabled phone).

    somebody suggested to me to take a look at http://java.sun.com/j2me/docs/html/docs/Running.html

    I've tried the instructions from the url but it seems like its just the configuration
    you run when you test it in your emulator. Similar to changing the preferences on ktoolbar to use a proxy.

    This is what I did:

    I tried changing the config to a working proxy, compiled my midlet, download
    it into my java-enabled phone and tested if it can connect to a backend
    server. The result: I was able to get a reply from the backend, however,
    when I changed the configuration to a non-working proxy, I still get a reply
    from the backend server. This leads me to believe that the midlet uses the
    current internet connection profile on the phone.

    If this is the case, then that means I am dependent on the phone settings and I could not change/force the midlet to use the current connection with a proxy server I defined. I've
    searched the internet and have seen sample codes to use proxy servers when connecting to the intenet but they are not for j2me applications (so far). Is this a limitation of j2me? maybe there is really no way to connect using a proxy defined in an application since there is no api for it? Correct me if I'm wrong though. Is there a workaround for this?

    #2
    Another problem that I am trying to solve is to get the value of the gateway IP address defined on the phone when it connects to the internet. Is this possible? If so, how?

    Any ideas will be very much appreciated. thanks to all.

    -jess

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    RE: help: forcing use of proxy in j2me and getting value of gateway IP address

    hi,

    does anyone have an answer to this? hope you can help. thanks again.

Posting Permissions

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