I am trying to use JavaScript SSE from Jersey. I have Following code in my resource. I am hosting on Java7 and Tomcat 7. I dont get any error. But I don\'t see data either o
The OutboundEvent.Builder.name method sets the value of the SSE event field. Therefore, it is not treated as a message and cannot be listened using the .onmessage handler. The solution is simply using the addEventListener
method to register the listener method.
This code should work with the Jersey sample above.
I found this article to be useful to understand how the SSE works in the browser side: http://www.sitepoint.com/server-sent-events/.