尝试从其他机器访问时,Dojo Library加载Worklight项目中的错误 [英] Dojo Library loading error in Worklight project when trying to access from other Machine

查看:98
本文介绍了尝试从其他机器访问时,Dojo Library加载Worklight项目中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个使用Dojo Library的Worklight项目。在部署项目之后,我的本地机器工作正常,但是当我尝试从同一网络上的另一台PC运行应用程序时,dojo Library主机仍然指向localhost比我的IP地址。



如何更改在工作台6应用程序中指向我的IP地址的Dojo库主机。

 来自其他机器浏览器的页面源视图中的库路径

(function(){
var modules = {dojo:{name:dojo,location:http:// localhost:53281 / dojoLib / xxx / xxx / common / dojo},dijit:{name:dijit,location: http:// localhost:53281 / dojoLib / xxx / xxx / common / dijit},dojox:{name:dojox,location:http:// localhost:53281 / dojoLib / xxx / xxx / common / dojox }};

任何帮助被评估。

解决方案

我想出了这个问题。



在Worklight Studio V6.0的第一个版本中,有一个问题, dojo库服务器的主机名被设置为localhost,这导致应用程序需要库中的dojo文件失败,如果它们不在与Worklight Studio相同的主机上运行(即使在同一主机上的模拟器中运行的应用程序可能会遇到问题)但是,最新的Worklight Studio版本现在为dojo选择一个IP地址库服务器的方式与在V5中自动选择Worklight服务器的IP地址相同。


I have developed a Worklight project which uses Dojo Library.After deploying project it worked fine in my local machine ,but when i tried to run the application from another PC on the same network the dojo Library host is still pointing to localhost rather than my IP Address.

How to change Dojo library host pointing to my IP Address in Worklight 6 Application.

Library path in "Page Source View" from other Machine Browser

(function(){
    var modules = { dojo: {name: "dojo", location: "http://localhost:53281/dojoLib/xxx/xxx/common/dojo"}, dijit: {name: "dijit", location: "http://localhost:53281/dojoLib/xxx/xxx/common/dijit"}, dojox: {name: "dojox", location: "http://localhost:53281/dojoLib/xxx/xxx/common/dojox"}};

Any help is appretiated.

解决方案

I figured out the problem.

In the first release of Worklight Studio V6.0, there was a problem where the hostname for the dojo library server was getting set to localhost. This caused apps that needed dojo files from the Library to fail if they that weren't running on the same host as Worklight Studio. (even apps running in emulators on the same host could run into problems) However, the latest build of Worklight Studio now selects an IP address for the dojo library server in much the same way that the IP address for the Worklight server was auto-selected in V5.

这篇关于尝试从其他机器访问时,Dojo Library加载Worklight项目中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆