This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes live update web page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "live update web page" Watch "live update web page" New topic
Author

live update web page

Andrew Galler
Greenhorn

Joined: Oct 04, 2001
Posts: 11
Does anybody know how to use Java to write a live update web page? just like those live
score updates from those sports web pages. 'coz I know servlet can only pull information
from server, so how can I push those info. from server out to the web-based client?
Thanks in advance.
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
You have to use java to keep the information updated in the server.
But you don't need to use it to update the client, you can just make the client to request the info periodically. You can get this with a HTML meta tag:
<meta http-equiv="REFRESH" content="60">
Vikas Aggarwal
Ranch Hand

Joined: Jun 22, 2001
Posts: 140
That's the best way given by Juanjo. You can also use the javascript method for refreshing the page after a certain interval of time. Any javascript based timer can be customized for this.
On an advanced stage, you can use the client pull mode. For that you will have to dig into the deep client server programming in java.


Vikas Aggarwal

Founder @
Leads and Deals Limited

www.LeadsAndDeals.com
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: live update web page