0 Replies Latest reply on Sep 18, 2009 2:07 AM by 807575

    netbeans timers

      I need to create a kind of streaming web app, and I chose to do this using a javascript timer.
      It works fine, waking up and sending ajax messages to a servlet that sends back to the requester.

      However, I am not sure how to maintain a session variable with the servlet for each client.
      Since there is never any page refreshes (as everything is done with the ajax message and Dom writing), how can I
      persistently save a String for each client? There is one JSF page, but can this servlet write to a hidden
      field on that page for each client, or can it access the session created by the JSF page and save
      the field as a session attribute, with each client session?

      It might be easier to just redo this thing using no javascript, but I am not sure how to
      create a non-javascript timer that periodically posts back to the server.