File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Client Call Backs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Client Call Backs" Watch "Client Call Backs" New topic
Author

Client Call Backs

Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Hi. I'm using the struts framework to implement a registration system for a University. Is there any way to force a browser refresh when, for example, the number of slots remaining in a class changes?
Any help would be greatly appreciated. Thanks.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

No. HTTP can't "push", only respond to "pull" requests. About as close as you can get would be to setup a page that has a periodic refresh.
Somebody trying to use a page to sign up for courses would find that rather intrusive, however; their data input would be disrupted. If you're thinking about a public display (something like airport flight monitors), then a periodic refresh should be OK.


Customer surveys are for companies who didn't pay proper attention to begin with.
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Ok, thanks.
Jim Wang
Ranch Hand

Joined: Oct 04, 2001
Posts: 41
There has a javascript function let your load page from url ( location.replace(url) ). I think if you put a timer before it, you may get refresh function. But it's not good to force your client to do something.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Client Call Backs
 
Similar Threads
Passed SCWCD at the age of 12 years 8 months
profile pictures
Grains - algorithm
Keyboard for your kitty
Marcus Mock3 Q17