the client would need to refresh.
You can specify an auto refresh in the meta tags
Main Topics
Browse All TopicsHi,
I need to update the values of clients pages , when ever a request to the servlet arrives.
namely the servlet has to update all its client's HTML pages,when ever a new request is sent from any one of its clients.
for an example.
consider the value of a variable A in servlet is 1, initially
Three pages m1,m2,and m3 are accessing that servlet
and value of A is displayed in m1,m2 and m3
if m1 calls the servlet and updates the value of A to 2.
Then this updation has to be reflected in m2 and m3 also.
This must not be done by the clients,by refreshing itselt, or by sending a request to the servlet at certain intervals.
The servlet itselt has to update all its clients.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
tnx for ur reply tbone
I state my problem some more clearly here
Im using a servlet and this servlet generates a HTML page. say the value of varable 'int a' ('a' is zero,initially) is displayed in that HTML page.
like out.println(value of a is + a);
The value of 'a' is incremented,when ever a request is received by the servlet.
like a++;
that HTML page has a button named "update",by clicking that button, a request is sent to the servlet.
in this case the servlet is accessed from three different machines.
if update button is clicked in one page,then the increment of value 'a' has to be reflected in all three pages in three different machines.(usually only the page which calls the servlet,will be updated)
This must not be done by , refreshing the page manually or at certain intervals, or by sending a request to the servlet at certain intervals.
The servlet itselt has to update all its client pages.
You can definitely have something within each applet listening for notification from the server to do a refresh. You might have to do some socket stuff, but it can definitely be done (say open a ServerSocket within each applet that gets loaded, relay the location of the ServerSocket back to the server, and finally have the server send out a message to each of these ServerSockets that it needs to have the browser refreshed). NOTE: I have never had the need to do this but I'm just brainstorming with you. Anyway, this would be one way of getting the users to have their pages refreshed without their intervention.
you would probably need a push technology based architecture... your servlets needs to push data/events to the clients... since the HTTP is connection less protocol the servlet cannot keep track of which clients are open... you can check out the following tutorial on using Pushlets for your requirement... you can do it either with Servlets/DHTML
http://www.javaworld.com/j
http://www.unix.org.ua/ore
http://www.theserverside.c
check this out
http://www.pushlets.com/
Business Accounts
Answer for Membership
by: tbone343Posted on 2005-01-02 at 23:06:06ID: 12941799
what does it mean for a servlet to update all its clients? what do you mean when you use the word client? what are you exactly trying to do because it sounds like you may be doing it the wrong way? state your actual problem and it might be the case that another method is probably better.