# The Java EE 7 Tutorial

# 13 Using Ajax with JavaServer Faces Technology

Ajax is an acronym for Asynchronous JavaScript and XML, a group of web technologies that enable creation of dynamic and highly responsive web applications. Using Ajax, web applications can retrieve content from the server without interfering with the display on the client. In the Java EE 7 platform, JavaServer Faces technology provides built-in support for Ajax.

Early web applications were created mostly as static web pages. When a static web page is updated by a client, the entire page has to reload to reflect the update. In effect, every update needs a page reload to reflect the change. Repetitive page reloads can result in excessive network access and can impact application performance. Technologies such as Ajax were created to overcome these deficiencies.

This chapter describes using Ajax functionality in JavaServer Faces web applications.

The following topics are addressed here:

- Overview of Ajax

- Using Ajax Functionality with JavaServer Faces Technology

- Using Ajax with Facelets

- Sending an Ajax Request

- Monitoring Events on the Client

- Handling Errors

- Receiving an Ajax Response

- Ajax Request Lifecycle

- Grouping of Components

- Loading JavaScript as a Resource

- The ajaxguessnumber Example Application

- Further Information about Ajax in JavaServer Faces Technology