2011-09-27 72 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