I embedded tomcat 8.0.20 and used it on my server. I create a webcocket tomcat example, and when I try to run it on my server for all 4 examples (Echo, chat, etc.), I get
Information: WebSocket connection is closed, Code: 1006
In the console, it prints something like (URL is correct for sample)
Connection to WebSocket for 'ws: // localhost: 9763 / examples / websocket / echoProgrammatic' failed: WebSocket handshake error: Unexpected response code: 302
When I deploy this to tomcat, it shows error 404 instead of 302.
Can someone tell me what could be causing this?
In pom, my dependency is as follows
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
, websocket . - ?