HTML and CSS Reference
JSF 2.2: What's New?
The work on JSF 2.2 started in early 2011, just a couple of months after the second maintenance release of JSF
2.0. After two years of work on the specification and reference implementation (Mojarra 2.2), JSF 2.2 was released
in late May 2013. JSF 2.2 is also part of Java EE 7 released in June 2013. JSF 2.2 provides a handful of exciting new
features (also known as the big-ticket features), a number of significant improvements, and quite a few specification
clarifications and bug fixes. JSF 2.2 is backwards compatible with earlier 2.0 releases. This is great news, as you won't
have to rewrite your JSF 2.0 application to support the new features of 2.2. There are a couple of exceptions where you
would have to make minor changes to your application.
In this chapter we will present and demonstrate the big-ticket features of JSF 2.2 and touch upon some of the
most significant changes. Finally, we will have a look at the changes you would need to implement in your JSF 2.0
application to be fully compatible with JSF 2.2.
For all the details of the JSF 2.2 specification, also known as JSR 344, you can visit the Java Community Process
Big Ticket Features
JSF 2.2 is a minor upgrade with backwards compatibility to JSF 2.0. It builds on top of the already existing JSF features.
However, JSF 2.2 contains four new major features. These are
HTML5-Friendly Markup: This feature adds HTML5 support to JSF by allowing to pass
through arbitrary attributes and elements from JSF components in Facelet views to rendered
Resource Library Contract: This feature builds on top of the templating features provided by
Facelets. With resource library contracts, it is possible to supply sets of templates along with
the application or in separate jar files included in the class path of the application.
Faces Flow: This feature is similar to resource library contracts by allowing user flows to be
defined and packaged for reuse. A new bean scope is introduced to manage the lifecycle of
beans involved in the flows.
Stateless Views: This feature allows marking views as stateless and thereby transient.
There are many other smaller changes in JSF 2.2, and we have covered the most significant ones in the section
following the big-ticket features.