Having a wide variety of web application frameworks available (at the time of
writing, Wikipedia lists 31 Java web application frameworks, and this list is far
from exhaustive!), often resulted in "analysis paralysis", that is, developers often
spend an inordinate amount of time evaluating frameworks for their applications.
The introduction of JSF to the Java EE specification resulted in having a standard
web application framework available in any Java EE compliant application server.
We don't mean to imply that other web application frameworks
are obsolete or that they shouldn't be used at all. However, a lot of
organizations consider JSF the "safe" choice since it is part of the standard
and should be well supported for the foreseeable future. Additionally,
NetBeans offers excellent JSF support, making JSF a very attractive choice.
Strictly speaking, JSF is not a web application framework per se, but a component
framework. In theory, JSF can be used to write applications that are not web-based,
however, in practice JSF is almost always used for this purpose.
In addition to being the standard Java EE component framework, one benefit of JSF
is that it provides good support for tools vendors, allowing tools such as NetBeans
to take advantage of the JSF component model with drag and drop support for
Developing our first JSF application
From an application developer's point of view, a JSF application consists of a series
of XHTML pages containing custom JSF tags, one or more JSF managed beans , and
an optional configuration file named faces-config.xml .
faces-config.xml used to be required in JSF 1.x, however, in JSF 2.0,
some conventions were introduced that reduce the need for configuration.
Additonally, a lot of JSF configuration can be specified using annotations,
reducing, and in some cases, eliminating the need for this XML configura-
Creating a new JSF project
To create a new JSF project, we need to go to File | New Project , select the Java Web
project category, and Web Application as the project type.