How to properly configure Stomp and SockJS endpoint in Spring MVC?
This is/may be duplicate of: Websocket - InvalidStateError: The connection has not been established yet . I am implementing Notification System. And want to initialize Socket connection when user Logged In, and show him his notifications, and also if some event happens. My Code snippet as follows. websocket.js : var stompClient = null; function connect( temp ) { alert(temp); //var socket = new SockJS("/websock"); //var socket = new SockJS("/websock"+temp); var socket = new SockJS(context_path+"/websock"+temp); //context_path == "/SupportCenter" stompClient = Stomp.over(socket); stompClient