问题
I m trying to deploy spring-websocket-portfolio sample app wich use stomp/sockjs client with spring j2ee server .
the same war package succeed in Tomcat7 and failed in jboss 6.4 and Tomcat6 with 404 error code .
The error in chrome console is :
sockjs.js:1622 GET http://localhost:8080/spring-websocket-portfolio/portfolio/info?t=1466117690528 404 (Not Found)
Any idea ?
回答1:
Your server needs to be Servlet 3.0+ and should support the websocket API.
You'll find the list of officially supported servers in Spring's reference documentation, namely Tomcat 7.0.47+, Jetty 9.1+, GlassFish 4.1+, WebLogic 12.1.3+, and Undertow 1.0+ (and WildFly 8.0+)
.
For JBoss 6.4, there are a few configuration tricks to enable websocket support in the container (see this example).
来源:https://stackoverflow.com/questions/37870782/stomp-sockjs-404-not-found-error-in-jboss-6-4