Book Image

Java EE 7 Development with NetBeans 8

By : David R Heffelfinger
5 (1)
Book Image

Java EE 7 Development with NetBeans 8

5 (1)
By: David R Heffelfinger

Overview of this book

Table of Contents (18 chapters)
Java EE 7 Development with NetBeans 8
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 9. Java API for WebSocket

Traditionally, web applications consist of a request/response model. That is, the browser sends an HTTP request to the server and the server sends back an HTTP response. WebSocket is a new HTML5 technology that allows two-way, full-duplex communication between the client (typically a web browser) and the server. In other words, it allows the server to send data to the browser in real time, without having to wait for an HTTP request. Java EE 7 includes full support for developing WebSocket applications, and NetBeans includes some features that make developing WebSocket Java EE applications easier.

In this chapter, we will cover the following topics:

  • Examining WebSocket code using samples included with NetBeans

  • Developing a Java EE application using WebSocket