From the course: Java EE 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

JavaScript WebSocket clients

JavaScript WebSocket clients - Java EE Tutorial

From the course: Java EE 8 Essential Training

Start my 1-month free trial

JavaScript WebSocket clients

- [Instructor] Once a web socket server endpoint is built, clients can connect to the endpoint to engage in full duplex communication that allows both sides of the connection to send a message. In this lesson, we're going to build out a JavaScript client that connects to our previously built web socket server endpoint. So within the JSF project, you'll see that I've created the help-js facelet, and this is a facelet that's going to facilitate a help chat that allows item managers to discuss product issues. It's a very simple JSF page. You'll notice we have a form named chat. Within chat are two controls that are text boxes. One is a name and the other is the message text. So the individual can enter their name and then the message they want to send, and then we're going to enter that into the message area here, which is just a div where we're going to allow the chat to take place. Now, in order to build out a JavaScript…

Contents