WebSocket handshake: Unexpected response code: 404

后端 未结 4 1572
予麋鹿
予麋鹿 2021-02-19 06:07

Am writing my first websocket program and am getting \"WebSocket handshake: Unexpected response code: 404\", error while loading the webpage.

I am using

4条回答
  •  抹茶落季
    2021-02-19 06:33

    Thank you guys for your suggestion, I found the answer.

    The code I copied is from http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/HomeWebsocket/WebsocketHome.html site.

    The problem was the url as mentioned in the js file and the project name they are proposing is WebsocketHome. I had changed the project name to Websocket thus my url should be ws://localhost:8080/Websocket/actions.

    Thanks for your support.

提交回复
热议问题