What Is New in JSF 2.1
JSF 2.1 is a maintenance release focused on bug fixes, clarifications, and minor enhancements to the JSF 2.0 specification. It builds upon the major features introduced in 2.0 without adding significant new APIs.
| Category | Key Changes |
|---|---|
| Specification Clarifications | Refined language and resolved ambiguities in the specification document. |
| Bug Fixes | Addressed issues in the JSF 2.0 specification and API. |
| Minor Enhancements | Small improvements to existing features and lifecycle behavior. |
What are the main specification clarifications in JSF 2.1?
The primary goal was to clean up the spec text. This release tightened up the wording throughout the document to eliminate ambiguity and ensure consistent interpretation by implementers. For developers, this means more predictable behavior across different JSF runtimes.
Clarifications often target edge cases in the request processing lifecycle or component rendering. This matters because it reduces the chances of encountering implementation-specific bugs that are hard to trace.
Did JSF 2.1 introduce any new tags or components?
No, JSF 2.1 did not introduce new facelet tags or UI components. The major component system overhaul happened in JSF 2.0 with the introduction of composite components and the resource handling framework.
This release was about stabilization, not expansion. In practice, you won't find new tags to learn, but the existing ones should behave more reliably.
How does JSF 2.1 handle existing bugs?
It addresses bugs that were identified as flaws in the JSF 2.0 specification itself, not just in a particular implementation like Mojarra or MyFaces. These are fixes that required a spec change to resolve correctly.
For example, issues related to view state handling, event queuing, or lifecycle phase execution were clarified. You'd only notice these fixes if you were hitting a very specific edge case in 2.0.
FAQ
Should I upgrade from JSF 2.0 to 2.1 immediately?
Yes, the upgrade is straightforward. Since it's a maintenance release, it's backward compatible and primarily offers bug fixes. You just need to update your JSF implementation JARs.
Are there any breaking changes in JSF 2.1?
No, there are no intentional breaking changes. The changes are limited to clarifications and bug fixes that should not break existing, well-behaved JSF 2.0 applications.
Does JSF 2.1 require a new version of Facelets?
No, JSF 2.1 continues to use the Facelets view declaration language that was integrated into the core specification with JSF 2.0.
What implementation should I use for JSF 2.1?
You would use the 2.1.x version of a JSF runtime, such as Mojarra (Oracle's implementation) or Apache MyFaces. Both implemented the JSF 2.1 specification.
Is there new AJAX functionality in 2.1?
No, the foundational AJAX support introduced in JSF 2.0 via the <f:ajax> tag remains unchanged in this release. The enhancements are elsewhere.