Following the youtube demo of websockets in glassfish
<
http://www.youtube.com/watch?v=dPPDWzzv86U>, I downloaded the chat
source
<
https://grizzly.dev.java.net/source/browse/grizzly/trunk/code/samples/websockets/chat/>,
built it and deployed on the latest 3.1-SNAPSHOT of GlassFish.
But when I access localhost:8080/grizzly-websockets-chat and login as
"Bhavani", it shows:* Bhavani: has left the chat
*I also tried creating WebSocket via a simple html:
<script>
ws = new
WebSocket("ws://192.168.1.100:8080/grizzly-websockets-chat/chat");
ws.onclose = function()
{
alert("socket closed");
};
</script>
and I always see "socket closed"
*Am I missing something?
PS: I tried with different browsers (chrome, opera -- all latest
versions which support websockets), and also tried switching
grizzly-http-servlet versions 1.9.21, 1.9.20 in my pom.xml, but nothing
seems to help.
Thanks,
Bhavani.
*