0

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.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Stephane
  • 235
  • 4
  • 7
  • possible duplicate of [Is there a real server push over http?](http://stackoverflow.com/questions/8110550/is-there-a-real-server-push-over-http) – Quentin Jan 30 '12 at 10:43

2 Answers2

2

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/

Ted
  • 1,641
  • 7
  • 30
  • 52
  • Many thanks for your inputs, I'm totally new to the reverse ajax concepts and the IBM article really helped me. After reading it and other inputs on the subject, I chose cometd that should fit to my needs. – Stephane Jan 31 '12 at 13:15
  • @Stepane I just came across this: http://dojotoolkit.org/features/1.6/dojo-websocket – Ted Jan 31 '12 at 15:27
1

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

tartak
  • 485
  • 3
  • 17