简体   繁体   中英

From the server side, how to update data in the client web page?

In a java web application, I'm trying to display a page where the displayed items are updated on the server side.

Basicly, I would like to display a page where the user can select a set of tasks and then, launch those tasks (for the moment, nothing difficult). Then, I would like to display a page where the user can monitor the status of the tasks (waiting, runing, ended...).

In order to avoid the client polling the server or refresh timers => from the server side, how can I update data in the client web page?

Can JSF resolve such problems? I tried to use java FX but it seems to be very slow and requires the Java FX RE installation (not possible for my users). What about GWT?

Thanks for your help.

You're looking for a comet or long-polling technique. Here is a general description with a nice explanation: http://www.ibm.com/developerworks/web/library/wa-reverseajax4/?ca=drs- Also, the cometd website, which will work with jquery or dojo: http://cometd.org/ I

Another solution is Atmosphere: https://github.com/Atmosphere/atmosphere Also here: http://jfarcand.wordpress.com/2010/06/15/using-atmospheres-jquery-plug-in-to-build-applicationsupporting-both-websocket-and-comet/

I did such thing (push) by using icefaces push library. Take a look here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM