Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

AJAX and server timer object

Thread view: 
aostrik@gmail.com - 27 May 2006 13:23 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.