Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
11 replies Latest Post - ‏2012-10-30T02:03:11Z by IshitaJain
IshitaJain
IshitaJain
20 Posts
ACCEPTED ANSWER

Pinned topic How can we configure IBM worklight to start on the static IP address ?

‏2012-10-29T21:06:53Z |
How can we configure IBM worklight to start on the static IP address of my machine instead of localhost?
  • IshitaJain
    IshitaJain
    20 Posts
    ACCEPTED ANSWER

    Re: How can we configure IBM worklight to start on the static IP address ?

    ‏2012-10-29T21:12:57Z  in response to IshitaJain
    By IBM Worklight I mean IBM Worklight Server
    • qcduong
      qcduong
      30 Posts
      ACCEPTED ANSWER

      Re: How can we configure IBM worklight to start on the static IP address ?

      ‏2012-10-29T21:44:15Z  in response to IshitaJain
      You can update the worklight.properties file
      #publicWorkLightHostname={localhost or some static ip}
      • DJKim
        DJKim
        4 Posts
        ACCEPTED ANSWER

        Re: How can we configure IBM worklight to start on the static IP address ?

        ‏2012-10-29T23:06:15Z  in response to qcduong
        C:\Program Files\IBM\Worklight\ApplicationCenter\
        installer\IBMAppCenter\server\conf\
        worklight.properties

        is the path, just in case if you need.
        D.J. Kim
  • IshitaJain
    IshitaJain
    20 Posts
    ACCEPTED ANSWER

    Re: How can we configure IBM worklight to start on the static IP address ?

    ‏2012-10-30T00:21:42Z  in response to IshitaJain
    I changed the #publicWorkLightHostname property in worklight.properties for my particular app.
    But, still when i run worklight (that is start the eclipse) it says:
    2012-10-29 17:14:18 Worklight Server started successfully on localhost:8080

    Howevere i want to start it on my IP.
    Please help
    • qcduong
      qcduong
      30 Posts
      ACCEPTED ANSWER

      Re: How can we configure IBM worklight to start on the static IP address ?

      ‏2012-10-30T00:58:36Z  in response to IshitaJain
      Are you using the server in the worklight studio or a remote instance on Liberty or WAS?
    • qcduong
      qcduong
      30 Posts
      ACCEPTED ANSWER

      Re: How can we configure IBM worklight to start on the static IP address ?

      ‏2012-10-30T00:59:43Z  in response to IshitaJain
      What is the location of the properties file that you are updating?
  • IshitaJain
    IshitaJain
    20 Posts
    ACCEPTED ANSWER

    Re: How can we configure IBM worklight to start on the static IP address ?

    ‏2012-10-30T01:15:17Z  in response to IshitaJain
    I am using IBM Worklight server

    The location of this worklight.properties is C:\Users\Ishita\worklight\zShop\server\conf

    where worklight is the workspace and
    zShop is the name of my project
  • IshitaJain
    IshitaJain
    20 Posts
    ACCEPTED ANSWER

    Re: How can we configure IBM worklight to start on the static IP address ?

    ‏2012-10-30T01:28:45Z  in response to IshitaJain
    Basically, I need to integrate my app with Facebook API.

    I have configured it to my web url and domain space.
    It works absolutely fine in the browser through the address something like this
    http://{WWW.MY_DOMAIN.COM}:8080/rest of the url
    I am able to do this even from remote computer as well as local computer on which this app is running and where worklight server is running.

    I had already integrated android worklight environment which produced another project called zShopZShopAndroid.
    It even works fine on Worklight Mobile Browser Simulator.
    When I run this zShopZShopAndroid on my phone or emulator, facebook login doesn't work and gives an error as:
    Error:191
    The specified URL is not owned by the application.
    Perhaps, the android .apk file is requesting some other url {localhost}
    So, I wonder is it because worklight server is running on localhost??? as when i open eclipse i get this message in worklight console:
    "Worklight successfully started on localhost:8080"

    So, may be if i change it to start on my ip, it will work fine??

    Any ideas?
    • qcduong
      qcduong
      30 Posts
      ACCEPTED ANSWER

      Re: How can we configure IBM worklight to start on the static IP address ?

      ‏2012-10-30T01:55:05Z  in response to IshitaJain
      The ipaddress that your apk is bound to is going to be whatever you have in the application-descriptor.xml,

      The default is <worklightServerRootURL>http://${local.IPAddress}:8080</worklightServerRootURL>, which will resolve to the actual ip address of your system, not literally 'localhost'. You can take a look at the worklight settings for android to see what has been bounded.
  • IshitaJain
    IshitaJain
    20 Posts
    ACCEPTED ANSWER

    Re: How can we configure IBM worklight to start on the static IP address ?

    ‏2012-10-30T01:58:57Z  in response to IshitaJain
    In my application descriptor, I already configured it to the correct domain name and not localhost, but it still doesnt work :(
  • IshitaJain
    IshitaJain
    20 Posts
    ACCEPTED ANSWER

    Re: How can we configure IBM worklight to start on the static IP address ?

    ‏2012-10-30T02:03:11Z  in response to IshitaJain
    I tired with both

    http://${local.IPAddress}:8080 in application descriptor and

    http://mydomain.com:8080

    none of these works :(