Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Apr 2009
    Location
    Zelienople
    Posts
    1

    Demo not working within my framework...

    I successfully got the Lightstreamer demos working on linux using my apache webserver in a static www directory. As soon as I attempt to run LS from my own application framework it fails to load as I get a "WAITING FOR ENGINE..." message. It appears to load the lscommons.js & lspushpage.js files fine, but the lsengine.html file is never loaded (I am logging with a proxy monitor). Altough I have set the 'path' in the createEngine() method this does not appear to help.

    Here is the setup of my static www directory (non-framework integrated) that does work:

    document root: /www

    <script src="/lightstreamer/demos/ChatDemo/ls/lscommons.js" type="text/javascript"></script>
    <script src="/lightstreamer/demos/ChatDemo/ls/lspushpage.js" type="text/javascript"></script>

    ...

    pushPage.context.setDomain('foobar.com');
    lsEngine.connection.setLSHost('ls.foobar.com');
    lsEngine.connection.setLSPort('7070');
    pushPage.createEngine("DemoCommonEngine", "/lightstreamer/demos/ChatDemo/ls/", "SHARE_SESSION", true);


    Go to: http://www.foobar.com/lightstreamer/demos/ChatDemo and everything works as expected. Now if I attempt to run the (ChatDemo) index.html file within my application framework it fails. I keep all of the settings and paths the same as I am only moving the chatdemo page, the ls directory with the js files are still in the same spot being served statically via Apache.

    http://www.foobar.com/appdir/chat/index.html - fails

    My understanding is that by setting the path in createEngine() to '/lightstreamer/demos/ChatDemo/ls/' it should find the js libraries needed. Any suggestions on how I can go about debugging this?

    Thanks,
    Jason

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    972
    If I understand well, you reach both the "http://www.foobar.com/appdir/chat/index.html" URL and the "http://www.foobar.com/lightstreamer/demos/ChatDemo/index.html" URL from the same apache running instance.

    Hence, when you ask the http://www.foobar.com/appdir/chat/index.html page, it correctly finds the /lightstreamer/demos/ChatDemo/ls/lscommons.js resource.

    There is no reason why it shouldn't find /lightstreamer/demos/ChatDemo/ls/lsengine.html resource.
    Can you reach the page directly, either from the browser address bar or after putting a test "A" link on the chat demo page?
    Can you find any refused request in your monitor or in your web server log?

  3. #3
    Member
    Join Date
    Dec 2008
    Location
    Zelienople
    Posts
    2
    Quote Originally Posted by DarioCrivelli
    If I understand well, you reach both the "http://www.foobar.com/appdir/chat/index.html" URL and the "http://www.foobar.com/lightstreamer/demos/ChatDemo/index.html" URL from the same apache running instance.
    Correct.

    Quote Originally Posted by DarioCrivelli
    Hence, when you ask the http://www.foobar.com/appdir/chat/index.html page, it correctly finds the /lightstreamer/demos/ChatDemo/ls/lscommons.js resource.
    Correct.

    Quote Originally Posted by DarioCrivelli
    There is no reason why it shouldn't find /lightstreamer/demos/ChatDemo/ls/lsengine.html resource.
    Can you reach the page directly, either from the browser address bar or after putting a test "A" link on the chat demo page?
    Yes I can access this file directly.

    Quote Originally Posted by DarioCrivelli
    Can you find any refused request in your monitor or in your web server log?
    None. The output of my proxy log (running on my desktop) shows that it never performs an http get request on the lsengine.html file. It gets as far as requesting lscommons.js, lspushpage.js & logo.gif then stops.

    How does lsengine.html typically get called? (i.e. where and what path is prepended / appended).

    Thanks.

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,

    that's strange...I've only questions for you at the moment

    are the debug alerts active?
    don't you see any javascript exception in your page?

    can you see any relevant difference checking the source on the browser of the page in the two cases (with and without framework)?

    Which browsers have you tried? Did it always fail?

    can you specify which framework are you using? Is it a server framework or a client one?

 

 

Similar Threads

  1. Lightstreamer not working on my desktop
    By indir741 in forum General
    Replies: 1
    Last Post: June 15th, 2011, 05:20 PM
  2. LS getFieldValue not working
    By shreyaspurohit in forum Client APIs
    Replies: 4
    Last Post: December 18th, 2008, 09:39 AM
  3. Working examples!
    By jkrassman in forum Client APIs
    Replies: 1
    Last Post: November 5th, 2007, 11:37 AM
  4. Replies: 6
    Last Post: May 7th, 2007, 05:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 09:47 AM.