Web sockets chat in java/javascript