File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Reload pages for all users. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Reload pages for all users." Watch "Reload pages for all users." New topic

Reload pages for all users.

Val Dra
Ranch Hand

Joined: Jan 26, 2001
Posts: 439
Hi i have a separate class which is used as my server class. WHat it does is it sends messesges to all users . In servlet i recieve teh message from that class. Now whenever a new user login to my site it has a list of all people there that he can view. Now how do i refresh the list for all the other people who are already loged in and need to see a new person who just loged in ? Is there a nice eligant way of doing this ? I was thinking of using Observer pattern because it can notify when teh change occurs but in case of servlet how can i do that ? Thanks.

Val SCJP <BR>going for SCJD
Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

You can not force a refresh to reload on the client. There must be a request from the client side.
You can do a periodic refresh with <meta> or the best solution is probably to put the view of the list in an applet.

I agree. Here's the link:
subject: Reload pages for all users.
jQuery in Action, 3rd edition