5

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

4

1 回答 1

1

我通过使用 websocket 示例来做到这一点: websocket-chat

对于动作复合(在java中),看看这里

于 2013-06-11T20:26:38.257 回答