5.0.0-M2

Latest release in branch 5.0
Released 1 day ago (April 20, 2026)

Software JSF/Jakarta
Branch 5.0
Source code https://github.com/jakartaee/faces/tree/5.0.0-M2-RELEASE
Documentation https://javadoc.io/doc/jakarta.faces/jakarta.faces-api/5.0.0-M2/index.html
Download https://mvnrepository.com/artifact/jakarta.faces/jakarta.faces-api/5.0.0-M2
JSF/Jakarta 5.0 Releases View full list

What Is New in JSF 5.0

Category Key Changes
Major Features Content Security Policy support, HTML5 event enhancements
API Modernization Generics support, enum conversions, type safety improvements
CDI Integration Enhanced event observation, EL resolver updates
Component Updates HTML5 attributes, validation improvements, resource handling
Security Cookie security, configuration fixes
Backwards Compatibility Deprecated code removal, API cleanup

How does JSF 5.0 improve HTML5 event handling?

JSF 5.0 introduces comprehensive HTML5 event support through automatic passthrough attributes. All on* event attributes are now automatically passed through to the rendered HTML, eliminating the need for explicit component support.

This means you can use modern HTML5 events like oninput, onpaste, ondrag, and dozens more directly on JSF components. The framework maintains a configurable list of known events while allowing unknown ones with developer warnings for typos.

Example usage:

<h:inputText onpaste="handlePaste()">
    <f:ajax event="paste" listener="#{bean.handlePasteEvent}"/>
</h:inputText>

What API modernization changes come with JSF 5.0?

JSF 5.0 brings significant generics improvements throughout the API. Key classes like SelectItem, converters, validators, and event objects now have proper generics support.

Several core types have been converted to enums for better type safety. FacesMessage.Severity and PhaseId are now proper enums, and context parameters with fixed value sets use enum representations.

Generics improvements include:

  • SelectItem<T> with typed value
  • Generic converters and validators
  • Type-safe event values in ValueChangeEvent
  • Enhanced StateHelper with generic methods

How does JSF 5.0 enhance CDI and EL integration?

CDI integration gets major upgrades with the ability to observe Faces events using @Observes annotations. Phase events and other Faces-specific events can now be consumed through CDI observers.

Expression Language support includes EL 6.0 features with Optional and Record resolvers in the resolution chain. The importConstants functionality now works beyond just f:metadata sections.

In practice, this means you can write CDI observers for Faces lifecycle events and use modern EL features throughout your applications without workarounds.

What component and validation improvements are included?

Component rendering sees multiple enhancements including proper placeholder attribute support for h:inputText and h:inputTextarea. Resource handling improvements allow path separators in resource names.

Validation behavior gets clarified with fixes to UIInput.validateValue() authority boundaries and better bean validation integration. The f:resetValues tag gains clearModel attribute support.

Component updates:

  • Placeholder attributes for input components
  • Passthrough support on facets
  • Improved UISelectItems var attribute handling
  • Better resource path handling

FAQ

Does JSF 5.0 require Java 21?
Yes, JSF 5.0 requires Java SE 21 or higher as the minimum version. This aligns with Jakarta EE 12 platform requirements.

How do HTML5 events work with f:ajax?
HTML5 events work seamlessly with f:ajax. You can use the event name directly in the event attribute, and JSF will handle the Ajax behavior appropriately.

What happens to deprecated APIs from JSF 4.0?
APIs marked with @Deprecated(forRemoval = true, since = "4.0") are removed in JSF 5.0. This includes legacy composite component extensions and deprecated event types.

Can I use Content Security Policy with JSF 5.0?
Yes, CSP support is a major feature in JSF 5.0. The framework provides proper CSP header handling and nonce support for inline scripts and styles.

How does generics improve converter usage?
Generics in converters allow type-safe conversion methods. You get compile-time type checking instead of runtime casting, reducing ClassCastException risks.

Releases In Branch 5.0

Version Release date
5.0.0-M2 1 day ago
(April 20, 2026)
5.0.0-M1 1 month ago
(March 10, 2026)