Developing our first Faces application
To illustrate basic Jakarta Faces concepts, we will develop a simple application consisting of two Facelet pages and a single Contexts and Dependency Injection (CDI) named bean.
Facelets
As we mentioned in this chapter’s introduction, the default view technology for Jakarta Faces is called Facelets. Facelets need to be written using standard XML. The most popular way of developing Facelet pages is to use XHTML in conjunction with Jakarta Faces-specific XML namespaces. The following example shows what a typical Facelet page looks like:
<!-- XML declaration and doctype omitted --> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="jakarta.faces.html" xmlns:f="jakarta.faces.core"> <h:head> <title>Enter Customer Data</title> </h:head> <h:body> ...