Friday, 13 September 2013

How to implement long polling in Java with Struts 2?

How to implement long polling in Java with Struts 2?

I want to implement long polling in a java web application. Basically,
when a user logs in, I want him to be hooked into a notification service.
I want to push out new notifications to him from the server as they occur,
and I want him to see those notifications in real time. ( so short polling
or periodically checking with server from the client aren't good enough).
How can I do this? Essentially, I want a way to push a string message from
the server, and for the client to receive it immediately.
I've heard some references that this could be done using a 'http chunk
transfer' header from the server. But how would that be set up on the
client?

No comments:

Post a Comment