1

I do not understand the purpose of the properties listed in worklight.properties:

  • publicWorkLightHostname
  • publicWorkLightProtocol
  • publicWorkLightPort

Those properties are set when you do in eclipse the Run As -> "Build settings and deploy target..."

Are they duplicated? Which one is the valid one? Are they used in different ways?

I have read the documentation in info center:

https://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fadmin%2Fr_configuring_the_ibm_worklight_server_location.html

But there is no mention to the "Build settings and...".

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
Jxadro
  • 1,497
  • 2
  • 16
  • 36

1 Answers1

0

See this question and answer: worklight server configuration - separating adapters and server

The properties that are found in worklight.properties relate to the Worklight Server. The properties you have mentioned: publicWorklightHostname, publicWorklightPort, publicWorklightProtocol, are required because the server itself needs to know what is its URL to the outside world, so that it can embed it in redirects and such. These are also required for the Mobile Web, Desktop Browser environments and Worklight Console.

For example:
Create a new application and add the Mobile Web environment > Run on Worklight Development Server deploy. Open Worklight Console and click on "Get application URL". Copy the URL. Go to worklight.properties, change the publicWorklightPort to "100"; Go back to console, compare the previous URL with the current.

From Javier:
They are not used by the mobile apps. They are shipped with the .war and are used by the .war to provide information to the user like the web url, but the server does not use them for the execution of a mobile app.

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • I have not configured them and my mobile app is working fine, and the port of my WAS server (9082) is different of the port configured in the file 10080. When apply these properties? Only in development? Even in development I think the valid configuration is the one set by default in "Build settings and deploy target..." for the development server. – Jxadro May 22 '14 at 07:01
  • build settings and deploy target is when you want to build your application for a remote server. – Idan Adar May 22 '14 at 07:02
  • I'm sorry Idan but I do not see it clear, then those properties apply when you click the Run As -> "Run on Worklight Development Server"? – Jxadro May 22 '14 at 07:40
  • Those properties will be used by your local Worklight Development Server and will also be present in the .war file that you deploy to your QA/UAT/Prod application server (that Worklight Server is deployed to). You can override them using JNDI properties; they are typically used also by Worklight Console. – Idan Adar May 22 '14 at 07:54
  • Please could you explain a use case? – Jxadro May 22 '14 at 08:07
  • Like I said, create a new application, add MOBILE WEB environment, deploy, look at the console, click on "Get application URL". Copy the URL. go to worklight.properties, change the publicWorklightPort to "100", go back to console, see how the URL changes with the port to "100". – Idan Adar May 22 '14 at 08:12
  • Ok, so they are not used by the mobile apps. They are shipped with the .war and are used by the .war to provide information to the user like the web url, but the server does not use them for the execution of a mobile app. Thank you. – Jxadro May 22 '14 at 08:31
  • More information: http://ibmmobiletipsntricks.com/2014/05/26/where-do-i-specify-the-hostname-of-my-worklight-server/ – Jxadro Jul 11 '14 at 12:06