Server Sent Events on Play framework using Java
-
13-06-2021 - |
Question
I am completely new Play framework and Scala. I am trying to push some events from the server to the browser using Html5 -server sent events and play framework.
I came across this example in Scala. I tried implementing action composition in java by extending play.mvc.Action.Simple. I am not sure how to set the response headers in the action composition.
http://benquasmalltalk.blogspot.fr/2012/04/hub-interesting-but-undocumented.html
The data I am sending is coming from a database and not an enumeration. Any pointers will be helpful
Solution
I did this by using the websocket example: websocket-chat
And for action composite (in java), have a look here
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow