I am getting this error when project was deployed in my clients server.
WebSocket connection to 'ws://webserver:8080/Project/notificationendpoint' failed: Error during WebSocket handshake: Unexpected response code: 404
There is no problem running the code in my system. We both use Ubuntu 14.04.(32 bit). My chrome version: 47.0.2526.106. Client version: 48.0.2564.109
This is how i get the host location in js:
var wsUri = "ws://" + document.location.host + "/Project/notificationendpoint";
var websocket = new WebSocket(wsUri);
It connects to Server Endpoint:
@ServerEndpoint(value = "/notificationendpoint",
encoders = {NotifyEncoder.class},
decoders = {NotifyDecoder.class})
public class Notification {
......
}