Hi again,
I'm now trying to work on the real example on my machine and am coming across the same problem when I add the "environment" to the URL (local, uat, stage... etc).
The set up is as follows:
Domain: local.mysite.com
Web: local.
www.mysite.com
Port: 8071
Lighstreamer: local.lightstreamer.mysite.com
Lightstreamer Port: 8090
However I have a feeling that the entries in my host file conflicts with how the domain is being interpreted.
127.0.0.1 local.mysite.com.au
127.0.0.1 local.
www.mysite.com.au
127.0.0.1 local.lightstreamer.mysite.com.au
127.0.0.1 local.
www.lightstreamer.mysite.com.au
This is what I have on the client side:
<script language="JavaScript" src="
http://local.www.mysite.com.au:8071/lightstreamer/js/lscommons.js"></script>
<script language="JavaScript" src="
http://local.www.mysite.com.au:8071/lightstreamer/js/lspushpage.js"></script>
<div table="hellotable" item="item-test" field="field1">
loading...
</div>
<script>
var page = new PushPage();
page.context.setDomain("local.www.mysite.com.au");
page.onEngineCreation = function(engine) {
engine.context.setDebugAlertsOnClientError(true);
engine.connection.setLSHost("local.www.lightstreamer.mysite.com.au");
engine.connection.setLSPort(8090);
engine.connection.setAdapterName("PROXY_HELLOWORLD_SOCKETS");
engine.changeStatus("STREAMING");
}
page.bind();
page.createEngine("HelloWorldApp", "lightstreamer/js", "SHARE_SESSION");
var pushtable = new OverwriteTable(null, null, "MERGE");
pushtable.setPushedHtmlEnabled(true);
pushtable.setSnapshotRequired(true);
page.addTable(pushtable, "hellotable");
</script>
I also noticed that I needed to specifically put the "www" in the page domain and lightstreamer host.
Many Thanks,
C