Java Reference
In-Depth Information
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
Examining the WebSocket code using
samples included with NetBeans
NetBeans includes a lot of example projects that we can use as the basis for our
own projects. One particularly useful sample included with NetBeans is an Echo
application that uses WebSockets to output some server data on the browser.
Search WWH ::




Custom Search