Welcome to JavaServer Faces

Here you find all examples described in the book, as well as the JavaDocs for all Java classes used in the examples. I hope you have fun reading the book and that you'll find the examples useful.

Hans Bergsten

Chapter 2

Newsletter Subscription (Example 2-1) subscribe.jsp

Chapter 4

HelloYou Servlet output (Example 4-1)
HelloMIME Servlet output (Example 4-2)
JSP page output (Example 4-3) easy.jsp
Note! Before you run any of the Expense Report Application examples below, you must define at least one user as described in Chapter 5.

Chapter 5

Expense Report Application, final version login.jsp
loginerror.jsp

Chapter 6

Filter Area, stage 1 (Example 6-1) filterArea.jsp
Filter Area, stage 2 (Example 6-3) filterArea.jsp
Filter Area, stage 3 (Example 6-4) filterArea.jsp
Menu Area, stage 1 (Example 6-6) menuArea.jsp

Chapter 7

Report Entry Area, stage 1 (Example 7-2) entryFormArea.jsp
Filter Area, stage 4 (Example 7-5) filterArea.jsp

Chapter 8

Entry Form Area, stage 2 (Example 8-1) entryFormArea.jsp
Entry Form Area, stage 3 (Example 8-4) entryFormArea.jsp
Entry Form Area, stage 4 (Example 8-6) entryFormArea.jsp

Chapter 9

User Information Page, stage 1 (Example 9-1) prefUser.jsp
Language Selection Page, stage 1 (Example 9-2) prefLang.jsp
Font Selection Page, stage 1 (Example 9-3) prefFont.jsp

Chapter 10

Report List Area, stage 1 (Example 10-1) reportListArea.jsp
Report List Area, stage 2 (Example 10-2) reportListArea.jsp
Report List Area, stage 3 (Example 10-3) reportListArea.jsp
Entry List Area, stage 1 (Example 10-4) entryListArea.jsp

Chapter 11

Language Selection Page, stage 2 (Example 11-1) prefLang.jsp
Menu Area, stage 2 (Example 11-2) menuArea.jsp
Entry Form Area, stage 5 (Example 11-3) entryFormArea.jsp
Non-Western Languages Test Page (Example 11-4) nw_i18n.jsp

Chapter 12

Expense Report Application, final version (Examples 12-1 - 12-3) reports.jsp
menuArea.jspf
reportsArea.jspf
filterArea.jspf
reportListArea.jspf
detailsArea.jspf
entryFormArea.jspf
entryListArea.jspf
Dynamic Includes, Text Out Of Order (Example 12-4 and 12-5) main.jsp
included.jsp
Dynamic Includes, Using <f:verbatim> (Example 12-6) main2.jsp
included2.jsp
Combining JSF and non-JSF content with Tiles (Example 12-7 - 12-9) tilesLayout.jsp
poll.jsp
page1.jsp
page2.jsp
page3.jsp
header.html
menu.html
body1.html
body2.html
body3.html
Billboard Application, converted from Struts (Example 12-10 and 12-11) login.jsp
logout.jsp
main.jsp
entermsg.jsp
Using a component binding and a validator method binding.jsp
Capturing State with a PhaseListener, showing the result
Note! You must enable the listener in the faces-config.xml file and request at least one JSF view before you run this example.
 

Chapter 13

Custom BarRenderer in Report List Area, stage 4 (Example 13-1) reportListArea.jsp
Custom DatePickerRenderer (Example 13-2) datePicker.jsp

Chapter 14

Custom UITagLabel Component (Example 14-1) prefs.jsp
Custom UITree Component (Example 14-2)
Note! You must enable the CaptureStatePhaseListener in the faces-config.xml file and request at least one JSF view before you run this example.
listViewStates.jsp
showViewState.jsp

Chapter 15

View Created By The ClassViewHandler
Note! You must enable the ClassViewHandler in the faces-config.xml file before you run this example.
 
View Created By The XMLViewHandler
Note! You must enable the XMLViewHandler in the faces-config.xml file before you run this example.
subscribe.view
subscribe.html