Java Socket Server with JavaScript Client -
i put java socket server , client can send messages each other, want use javascript client, but... here happens when i'm hosting java server , load javascript client. javascript: var connection = new websocket('ws://127.0.0.1:9005'); connection.onopen = function () { connection.send('ping'); }; this prints in chrome console: websocket connection 'ws://127.0.0.1:9005/' failed: error during websocket handshake: invalid status line websocket error [object event] what i'm trying send "ping" java server, instead sends stuff disconnects... this prints in java server console: bread server running... new connection from: 127.0.0.1:51948 127.0.0.1:51948: / http/1.1 127.0.0.1:51948: host: 127.0.0.1:9005 127.0.0.1:51948: connection: upgrade 127.0.0.1:51948: pragma: no-cache 127.0.0.1:51948: cache-control: no-cache 127.0.0.1:51948: upgrade: websocket 127.0.0.1:51948: origin: http://markstuff.net 127.0.0.1...