Trying to use Spring 4 WebSocket with STOMP over socket using sockjs. And i faced a problem.
My configuration:
websocket.xml - part of spring context
firstly, you have set destination prefix with app, so you must add 'app' into your request url. e.g. if i wanted to request for '/ws', i should create SockJS with path '/server/app/ws', also you can code with
var socket = new SockJS("
and you know the 'server' is your project name over springmvc.
secondly, you must add the path '/app/*' to org.springframework.web.servlet.DispatcherServlet so as to avoid the path with prefix '/app' intercepted by interceptor defined in web.xml.