288 CHAPTER 6: Component-Based Web Development Using JSF 2
Building the Bookstore Application Using JSF 2
In this section, you will develop the bookstore application using JSF. In Chapter 1 you developed
the data access layer for the bookstore application and queried it via a stand-alone application
developed using Java. In Chapter 5 you refactored the stand-alone application to integrate it with
the Spring Framework in order to use the robust features offered by Spring’s JDBCTemplate. Then
you used the Spring JDBCTemplate with a Spring Web MVC web application. In this chapter, you
will use the same Spring JDBCTemplate with a JSF-based web application to leverage the benefits
of the Spring template discussed in Chapter 5. To do so, you need to integrate JSF with the Spring
Framework. In the section that follows, you will learn to integrate JSF with Spring. Then you will
develop the web layer of the application using JSF. You will develop this application in the following
four steps:
- Integrate JSF with the Spring Framework.
- Access the database from the web layer via Spring JDBCTemplate.
- Develop templates reusing the templates developed earlier.
- Develop the user interface using UI components and JSF EL.
Figure 6-18 illustrates the directory structure of the application you are going to develop.
Figure 6-17. Header and sidebar using templates