0
votes

I have a Worklight 6.0 project that uses the new Dojo 1.9 libs, I created an external dojo project, like the documentation suggested, then, in the main project properties, under "Dojo toolkit", it references this dojo19 project.

The project works on the local server, then I did "Run As" | "Build for Remote Server...", and entered the correct domain:port and context path, clicked Build, the *.wlapp files were updated. (I've also updated the settings for publicWorkLightHostname / publicWorkLightPort / publicWorkLightProtocol in the "Environment Entries for Web Modules" in the installed war to match the remote server names/port/protocol.)

But, after deploying both war and -all.wlapp file, accessing the app I get JS errors when it tries to refer to the dojo19 library:

    The page at 
https://<myIP>:9443/<myproject>/apps/services/www/ /mobilewebapp/default/IODMobile.html 
ran insecure content from http://localhost:64441/dojo19/<myproject>/IODMobile/mobilewebapp/dojo/nls/core-web-layer_en-us.js.

The dojo19 is the project name in my Worklight developer workspace that I referred to above.

Why is it trying localhost? Seems there's a missing step here in deploying the dojo library project into Worklight.

2

2 Answers

0
votes

Where are you trying to preview the application when you get the error message?

Partial copy/paste:

Step 1: Verify your application works in the Mobile Browser Simulator with Provide Library Resources checked. If the Console log is showing resources being served from the server, then these have to be copied to your application before deploying to AVD or a device

Step 2: After you think you have all Dojo/resources within your project, uncheck Provide Library Resources and test it again in MBS. If it fails in MBS, then something is missing in your application that is in the library/server. You can check Provide Library Resources and retest to see if it shows you what that is. Not all resources are shown, e.g. if there's a missing CSS file.

Also I would suggest to do all of this in the Development environment (that is, in Eclipse) before starting to deploy the .war file and .wlapp file etc... (which, BTW, I hope you're doing based on the new instructions for Worklight 6.0)

0
votes

In the information center, it will show you how to uncheck the Provide Library Resources in the Console Log.

I think what you're running into is: 1) Something is being served from the Dojo Library/Server 2) A bug in 6.0 that used "localhost" instead of the IP of the host (your machine running eclipse). This is fixed in the 6.0 iFix. With this fix, you can run your app external to Studio and still use the Dojo Library/Server. Without this fix, you must have everything you need within your app.

Can you install the iFix and let us know if that fixed the problem?