Java EE HTML5 WebSockets with multiple clients example

In this tutorial we will implement a message broadcast sample application using only HTML5 websockets. The server-side will be implemented with Java EE ServerEndpoint.

1. Introduction

In the previous tutorial – Java EE HTML5 WebSocket example – we have implemented a simple Java EE WebSockets enabled application where the client sent a simple message to the server over a websocket and then received a sequence of responses from the server over the same channel.

In this tutorial we will implement an application where clients will interactively send messages to each other through the server. This way we will have an application where clients are in fact publishing and receiving events to/from the server over HTML5 websockets.

This tutorial considers the following environment:


Source : http://www.javacodegeeks.com/2013/08/java-ee-html5-websockets-with-multiple-clients-example.html

Back to Top