I want to open a websocket port with a "webapp/socket.do" path. When I use SockJS and try to initiate the call by code
var socket = new SockJS('/webapp/socket.do');
stompClient = Stomp.over(socket);
stompClient.connect({}, ...
SockJS will by default add a "/info" to the end of the given path. I want to know why? Can this be changed or prevented?
When using this with Spring MVC and have url pattern mappings to DispatcherServlet like < url-pattern >*.do</url-pattern>
, this will return a 404 error. it is blocked because of the "/info" string added by sockJS to the given url.
Spring web.xml servlet mapping code:
<servlet-mapping>
<servlet-name>dispatch-servlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
Does any know what sockJS is trying there and why?