Hi ALL,
I have an object on the server which listenes for timer and does some
work as soon as the timer fires up.
I need to display the output of this object on the web-client.
Now I try to use AJAX.
As soon as browser has loaded the page I send XMLHttpRequest to servlet
which returns the output of that timer-object to the client.
Is that possible to send a reply to XMLHttpRequest callback function
every time when timer fires up without initiating XMLHttpRequest from
the client?
Or I should use some other technique?
Thank you.
Oliver Wong - 29 May 2006 19:26 GMT
> Hi ALL,
>
[quoted text clipped - 10 lines]
>
> Or I should use some other technique?
You might expose the time remaining to the client, so the client knows
when to check back for an update. For example, the client might ask "Has the
event fired yet?" and your server would check the timer, see that there's 35
seconds left, and respond "No. Ask me again in 35 seconds."
- Oliver