Latest in branch 2.2
2.2.8-35
Released 17 Oct 2019
(6 years ago)
SoftwareJSF/Jakarta Faces
Version2.2
RequirementJava EE 7
Initial release2.2.0
02 May 2013
(13 years ago)
Latest release2.2.8-35
17 Oct 2019
(6 years ago)
Documentationhttps://javadoc.io/doc/com.sun.faces/jsf-api/2.2.8-35/index.html
Downloadhttps://mvnrepository.com/artifact/com.sun.faces/jsf-api/2.2.8-35
JSF/Jakarta Faces 2.2 ReleasesView full list

What Is New in JSF 2.2

JSF 2.2 brought a set of focused enhancements that modernized the framework for richer web applications. The update prioritized HTML5 friendliness, resource handling, and component development. These changes made it easier to integrate with modern front-end practices.

Category Key Changes
HTML5 Support Passthrough Attributes, Passthrough Elements, Resource Library Contracts
Component Features Stateless Views, f:ajax disabled attribute, Bean Validation integration
Resource Handling Resource Library Contracts for themes, Resource packaging conventions
API Improvements New ViewDeclarationLanguage methods, FacesFlow (early concept)

How did JSF 2.2 improve HTML5 compatibility?

This was a major focus, introducing features to seamlessly work with HTML5. The passthrough attributes feature lets you render custom HTML5 data attributes directly onto JSF components. Passthrough elements allow you to use plain HTML5 tags that are treated as JSF components when needed.

In practice, you can now write code like this, mixing JSF and HTML5 naturally:

<h:inputText value="#{bean.value}">
    <f:passThroughAttribute name="data-role" value="input" />
    <f:passThroughAttribute name="placeholder" value="Enter text..." />
</h:inputText>

This matters because it bridges the gap between JSF's component model and the flexibility demanded by modern HTML5 and JavaScript frameworks.

What are the key new features for component authors?

JSF 2.2 added several powerful tools for building components. Stateless views, enabled by the transient attribute on the f:view tag, can significantly reduce memory overhead by not saving state. The f:ajax tag gained a disabled attribute for conditionally disabling Ajax behavior.

Bean Validation integration became more seamless, allowing validation groups to be specified directly on components. The ViewDeclarationLanguage API was expanded with methods like getComponentMetadata() and getScriptComponentResource(), giving component authors more control over the rendering pipeline.

How did resource handling get better?

Resource Library Contracts were introduced to finally solve the problem of theming and skinning. This feature allows you to package a complete set of resources -- CSS, images, JavaScript, and Facelets templates -- into a JAR file. The application can then switch between these packaged themes effortlessly.

This is a game-changer for large applications and teams that need to maintain multiple visual styles. It promotes reusability and clean separation between the core application logic and its visual presentation, moving beyond the limitations of the old resource library concept.

FAQ

What exactly are passthrough attributes and when should I use them?
Passthrough attributes allow you to add arbitrary HTML5 attributes (like data-*, placeholder, or type) to standard JSF components. Use them whenever you need to enhance a component with HTML5 features or integrate with JavaScript libraries without writing a custom renderer.

Does Stateless View mode mean my entire application becomes stateless?
No. It's a per-view setting. When you set transient="true" on f:view, that specific page won't save its UI component state. This is great for simple, read-heavy pages but not for forms with complex state. Your application can mix stateful and stateless views.

How do Resource Library Contracts improve on regular resources?
Regular resources are just individual files. A Contract is a packaged, self-contained theme. It can include templates, composite components, images, CSS, and JS all together in a JAR. This makes themes into reusable, versionable artifacts you can deploy independently from your application.

Is FacesFlow production-ready in JSF 2.2?
Not really. JSF 2.2 included an early, foundational API for FacesFlow (like the @FlowScoped annotation), but it was not fully realized. The complete and usable flow feature came later in JSF 2.2. Think of the 2.2 implementation as a precursor.

Can I use the new HTML5 features with older JSF components?
Yes, absolutely. The passthrough features are designed to work with existing standard and custom components. You can augment a legacy h:inputText with HTML5 attributes without modifying the component itself, which is great for gradual modernization of older applications.

Releases In Branch 2.2

VersionRelease date
2.2.8-3517 Oct 2019
(6 years ago)
2.2.2031 Jul 2019
(6 years ago)
2.2.8-3431 Jul 2019
(6 years ago)
2.2.8-3312 Jul 2019
(6 years ago)
2.2.1925 Apr 2019
(7 years ago)
2.2.8-3202 Apr 2019
(7 years ago)
2.2.8-3116 Nov 2018
(7 years ago)
2.2.8-3004 Sep 2018
(7 years ago)
2.2.1822 Aug 2018
(7 years ago)
2.2.8-2925 Jul 2018
(7 years ago)
2.2.8-2821 Jun 2018
(7 years ago)
2.2.1712 Apr 2018
(8 years ago)
2.2.8-2708 Apr 2018
(8 years ago)
2.2.1618 Jan 2018
(8 years ago)
2.2.8-2613 Dec 2017
(8 years ago)
2.2.8-2527 Nov 2017
(8 years ago)
2.2.1510 Oct 2017
(8 years ago)
2.2.8-2419 Sep 2017
(8 years ago)
2.2.8-2316 Jun 2017
(8 years ago)
2.2.8-2202 Jun 2017
(9 years ago)
2.2.8-2111 Apr 2017
(9 years ago)
2.2.8-2010 Apr 2017
(9 years ago)
2.2.8-1907 Feb 2017
(9 years ago)
2.2.1415 Nov 2016
(9 years ago)
2.2.8-1818 Aug 2016
(9 years ago)
2.2.8-1704 Aug 2016
(9 years ago)
2.2.8-1630 May 2016
(10 years ago)
2.2.8-1515 Apr 2016
(10 years ago)
2.2.8-1401 Apr 2016
(10 years ago)
2.2.8-1309 Mar 2016
(10 years ago)
2.2.1304 Feb 2016
(10 years ago)
2.2.8-1204 Jan 2016
(10 years ago)
2.2.1220 Jul 2015
(10 years ago)
2.2.8-1117 Jul 2015
(10 years ago)
2.2.8-1025 Jun 2015
(10 years ago)
2.2.8-0911 Jun 2015
(11 years ago)
2.2.8-0826 May 2015
(11 years ago)
2.2.1105 May 2015
(11 years ago)
2.2.8-0704 May 2015
(11 years ago)
2.2.1005 Feb 2015
(11 years ago)
2.2.8-0604 Feb 2015
(11 years ago)
2.2.8-0522 Jan 2015
(11 years ago)
2.2.918 Dec 2014
(11 years ago)
2.2.8-0409 Dec 2014
(11 years ago)
2.2.8-0215 Sep 2014
(11 years ago)
2.2.8-0127 Aug 2014
(11 years ago)
2.2.814 Aug 2014
(11 years ago)
2.2.710 Jun 2014
(12 years ago)
2.2.604 Mar 2014
(12 years ago)
2.2.508 Jan 2014
(12 years ago)
2.2.403 Oct 2013
(12 years ago)
2.2.305 Sep 2013
(12 years ago)
2.2.209 Aug 2013
(12 years ago)
2.2.109 Jul 2013
(12 years ago)
2.2.002 May 2013
(13 years ago)
2.2.0-m1526 Apr 2013
(13 years ago)
2.2.0-m1412 Apr 2013
(13 years ago)
2.2.0-m1302 Apr 2013
(13 years ago)
2.2.0-m1220 Mar 2013
(13 years ago)
2.2.0-m1111 Mar 2013
(13 years ago)
2.2.0-m1005 Mar 2013
(13 years ago)
2.2.0-m0905 Feb 2013
(13 years ago)
2.2.0-m0807 Jan 2013
(13 years ago)
2.2.0-m0711 Dec 2012
(13 years ago)
2.2.0-m0609 Nov 2012
(13 years ago)
2.2.0-m0507 Aug 2012
(13 years ago)
2.2.0-m0427 Jun 2012
(13 years ago)
2.2.0-m0301 Jun 2012
(14 years ago)