Java Reference
In-Depth Information
Step 3: Click Next to display the dialog box for choosing frameworks, as shown in
Figure  33.3. Check JavaServer Faces and JSF 2.2 as Server Library. Click Finish to
create the project, as shown in Figure 33.4.
choose JavaServer Faces
and JSF 2.2
(a)
(b)
F IGURE 33.2
The New Web Application dialog box enables you to create a new Web project.
F IGURE 33.3
Check JavaServer Faces and JSF 2.2 to create a Web project.
33.2.2 A Basic JSF Page
A new project was just created with a default page named index.xhtml, as shown in Figure 33.4.
This page is known as a facelet , which mixes JSF tags with XHTML tags. Listing 33.1 lists
the contents of index.xhtml.
facelet
L ISTING 33.1
index.xhtml
1 <?xml version='1.0' encoding='UTF-8' ?>
2 <!-- index.xhtml -->
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml"
xml version
comment
DOCTYPE
default namespace
 
 
Search WWH ::




Custom Search