You are looking for some asynchronous client/server communication.
- You can either periodically poll the server (query it every x time unit), can result in wasted queries (in form of HTTP requests) and subsequently waste bandwidth, if lots of polls find no new data.
- Or use what has been dubbed as "server push" which leaves an HTTP connection open for the server to push the updates back to the browser, without polling.
GWT and GWT-RPC:
To do the polling here, you can have a timer on the client-side (on the webpage) that will call a method that you have written on the server to give the data, can either be a
String that represents some news, or even encapsulate it into a
News class, with title, summary, body, and timestamp etc. The
News class will then have to be in a shared (between client and server) Java package, so the implementation can be used on both sides without having you duplicating code.
This gwt-comet library provides an efficient Comet implementation for GWT.
The library implements Comet by streaming messages over long lived HTTP requests to minimise latency and bandwidth requirements and maximise the throughput. This is opposed to many other implementations which use polling or long polling techniques.