I am a Grails newbie and working on getting WebSockets working in an application. I got most of it working except I couldn't figure out how to pass parameters to the methods annotated with @MessageMapping.
This works:
<!-- language: lang-groovy -->
`class MyController{
@MessageMapping(value="/start")
protected void startProcess(){ }
}
`
What I need something like this to work:
<!-- language: lang-java -->
`
@MessageMapping(value="/start/{file}")
protected void startProcess(){
String file = params.file
//do somethig with the file...
}
`
But it doesn't work. I have tried playing with UrlMappings.groovy, @PathVariable. I am pretty sure I am missing something simple. Any pointers?