I'm building an application with Spring 3, Spring MVC, Tomcat7. I'm triying to refresh content in a jsp when something changes in server side. For this purpose I followed this tutorial: https://netbeans.org/kb/docs/javaee/maven-websocketapi.html and this one http://self-learning-java-tutorial.blogspot.com.es/2014/08/annotated-server-endpoint.html.
Now I want to trigger one message to all clients (want to see the message in all oppened jsp pages) but I'm not sure how to do this. (For example when an entity is removed in server-side)
As far as I undesrstand, will I need to trigger somehow the method annotated with @OnMessage? and how would I do this? maybe injecting this @ServerEndpoint... class?
Thanks you all