I tried to create a websocket chat application using apache tomcat. but when i tried to open a websocket connection using this line,
webSocket = new WebSocket("ws://" + socket_url + ":" + port+ "/WebMobileGroupChatServer/chat?name=" + name);
and i also included the SocketServer.java using
@ServerEndpoint("/chat")
but it is firing a error when WebSocket is created,
WebSocket connection to 'ws://192.168.0.157:8080/WebMobileGroupChatServer/chat?name=sdf' failed: Error during WebSocket handshake: Unexpected response code: 404
i referred the code from this link
How can i solve it?