2011-09-27 74 views
0

我正在使用Shindig 2.0及其默认容器。 当容器呈现小工具,它会调用这个servlet:/gadgets/ifr?url=http://iltlvl094:8080/sample-gadget/spec.xml&libs=rpc&parent=http://iltlvl094&debug=1&#rpctoken=54612318更改Shindig容器中的主机名

这个servlet返回进口JavaScript文件从localhost HTML代码:

<script src="http://localhost:8080/gadgets/js/rpc.js?container=default&amp;nocache=0&amp;debug=1&amp;c=0&amp;v=249039fb66d20be125366df4d5ec26c2"></script>

为什么它是指localhost,而不是实际的主机名 - iltlvl094 ? 我可以在哪里改变它?

我正在使用Shindig开箱即用,因此我没有任何源代码或配置文件要修改。也许我可以通过命令行参数来做到这一点?

感谢, 托梅尔

回答

2

我发现我怎么能做到这一点。有两种方法:

  1. 添加系统属性:-Dshindig.host = my_host转变-Dshindig.port = my_port
  2. 添加到web.xml:shindig.host = my_host转变和shindig.port = my_port