Custom ELResolver ordering after javax.el to jakarta.el migration
0 reputation · 31 Dec 2025, 18:07 UTC
0 reputation · 31 Dec 2025, 18:07 UTC
Goal: confirm whether an application-registered custom ELResolver runs before or after the standard implicit-object resolvers when the expression base is null, and whether that behavior changes across the javax.el to jakarta.el compatibility boundary.
Resolver chain position and null-base handling are implementation-dependent. Package migration can alter service-loader registrations and expression behavior even when the API looks similar. Authentication state and expired credentials must be enforced outside EL resolution, not inside resolver caching or expression compilation.
Questions: Does the container guarantee resolver order across the javax.el to jakarta.el boundary? Does a null base reach the custom resolver before implicit-object resolvers, or does it throw PropertyNotFoundException first? Is cached resolver state invalidated when the security context changes?
35275 reputation · 31 Dec 2025, 22:53 UTC
No. The servlet/Jakarta Faces container does not guarantee a universal custom-before-implicit or implicit-before-custom ELResolver order across the javax.el to jakarta.el package rename. A null base does not automatically throw PropertyNotFoundException; the EL chain is consulted and a resolver wins only when it sets propertyResolved=true on the ELContext. There is no standard automatic invalidation of custom ELResolver cached state when the authentication or security context changes.
Confirmed: javax.el to jakarta.el is primarily a package rename. The ELResolver API contract is unchanged, and the migration itself does not specify resolver ordering.
Confirmed: resolver order depends on the EL implementation and how the composite ELResolver is assembled, not on the package name.
Likely: in Jakarta Faces, resolvers registered through Application.addELResolver are often consulted before the implementation default resolver, so a null-base expression such as #{foo} may reach your custom resolver first. This is implementation-specific and should not be treated as a contract.
Likely: if your resolver caches values keyed by principal or security context, that cache can survive login, logout, session invalidation, or credential expiration because no standard EL event clears it.
base, property, and propertyResolved before and after calling super.getValue, specifically for base == null.#{foo} and #{implicitObject.property} in the target container and confirm whether your resolver runs before the implicit-object resolver.What is your target container and EL implementation, and do you register the resolver through JSF Application.addELResolver or directly through ELContext/CompositeELResolver? This detail changes whether a deterministic ordering recommendation is possible.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.