在Shindig的容器中更改主机名

时间:2011-09-27 15:03:39

标签: apache-shindig

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

此servlet返回从localhost导入JavaScript文件的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开箱即用,因此我没有任何源代码或配置文件可以修改。也许我可以通过命令行参数来做到这一点?

谢谢, Tomer的

1 个答案:

答案 0 :(得分:2)

我发现我怎么能这样做。有两种方法:

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