Book Image

Mastering JavaServer Faces 2.2

By : Anghel Leonard
Book Image

Mastering JavaServer Faces 2.2

By: Anghel Leonard

Overview of this book

Table of Contents (20 chapters)
Mastering JavaServer Faces 2.2
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The JSF Life Cycle
Index

Chapter 4. JSF Configurations Using XML Files and Annotations – Part 1

Starting with JSF 2.0, there is no need to create the configuration file, faces-config.xml. Well, this affirmation is partially true, because JSF annotations still don't cover several configurations, such as resource bundles, factories, phase listeners, and so on. Usually, JSF annotations provide sufficient support for our applications; however, as you will see in this chapter, there are still many cases when faces-config.xml is mandatory, or additional configurations must be added in the web.xml file.

Nevertheless, JSF 2.2 provides a programmatic approach that can be used to reproduce faces-config.xml, without writing it in the classical approach. Later in this chapter, you will see how to take advantage of this new feature. For now, you will see a mix of creating and configuring different kinds of JSF artifacts. They will be arbitrarily presented—some of them are well known, from JSF 1.x and 2.0, while others are new...