O'Reilly logo

Java EE 7 Development with NetBeans 8 by David R. Heffelfinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building our own WebSocket applications

In the previous section, we saw how NetBeans provides sample WebSocket applications we can use as a base for our own projects. In this section, we will build a web application that contains a WebSocket server endpoint that will populate a form with default values.

To build a WebSocket application, create a web application project by going to File | New Project, selecting the Java Web option from the Categories list, and selecting Web Application from the Projects list.

Building our own WebSocket applications

Then, we pick a name and location as usual.

The Java API for WebSocket was introduced in Java EE 7; therefore, we must select this Java EE version ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required