Class FacesViewsViewHandler

  • All Implemented Interfaces:
    FacesWrapper<ViewHandler>

    public class FacesViewsViewHandler
    extends ViewHandlerWrapper
    View handler that renders an action URL extensionless if a resource is a mapped one, and faces views has been set to always render extensionless or if the current request is extensionless, otherwise as-is.

    Implementation note: this is installed by ApplicationProcessor during the PostConstructApplicationEvent, in which it's guaranteed that Faces initialization (typically done via a ServletContextListener) has been done. Setting a view handler programmatically requires the Faces Application to be present which isn't the case before Faces initialization has been done.

    Additionally, the view handler needs to be set BEFORE the first faces request is processed. Putting the view handler setting code in a Filter.init(jakarta.servlet.FilterConfig) method only works when all init methods are called during startup, OR when the filter filters every request.

    For a guide on FacesViews, please see the package summary.

    Since:
    1.3
    Author:
    Arjan Tijms
    See Also:
    FacesViews, ApplicationProcessor
    • Constructor Detail

      • FacesViewsViewHandler

        public FacesViewsViewHandler​(ViewHandler wrapped)
        Construct faces views view handler.
        Parameters:
        wrapped - The view handler to be wrapped.