I think I have
solved how to add support for web-socket.
My first approach was using the raw Java WebSocket 1.1 API defined by
JSR-356But this seems to be a little implementation specific to Tomcat/Jetty etc.
Therefore I have change approach to using Spring-Websocket.
Hereby Spring solves the problem of dealing with the right implementation of Web-Socket
Spring web socket support also enables more sophisticated protocols.
(the code sample from here works fine...)
There is one issue
Grails application.groovy
must have added @ComponentScan("helloworld")
Then it starts to work...
And the spring controllers cannot be located in grails-app/controllers/helloworld....
This gives a duplicate Request mapping.
This is another issue. (to be discussed somewhere else)