JSF 2.2 starts CDI integration, provides built-in CDI compatible ViewScoped and @FlowScoped, and all CDI scopes are compatible with JSF.
In JSF 2.3, more CDI alignments are added.
A lots of JSF built-in facilities are exposed as CDI beans, and can be injected as general CDI beans.
In JSF 2.2, to get JSF facilities.
FacesContext context= FacesContext.getCurrentInstance();
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
Map<String, Object> cookieMap = FacesContext.getCurrentInstance().getExternalContext().getRequestCookieMap();
Map<String, Object> viewMap = FacesContext.getCurrentInstance().getViewRoot().getViewMap();
In JSF 2.3, you can inject them directly in your backing bean.
@Inject
FacesContext facesContext;
@Inject
ExternalContext externalContext;
@Inject
@RequestCookieMap
Map<String, Object> cookieMap;
@Inject
@ViewMap
Map<String, Object> viewMap;
And all of these can be resolved via EL in facelets template.
There is a table listed all supported facilities in Arjan Tijms's blog entry, What's new in JSF 2.3? .
java.lang.Object (javax.servlet.ServletContext)
javax.faces.component.UIComponent
javax.faces.component.UIComponent
javax.faces.context.FacesContext
javax.faces.context.Flash
RequestParameterValuesMap
@RequestParameterValuesMap
java.lang.Object (javax.servlet.http.HttpServletRequest)
javax.faces.application.ResourceHandler
java.lang.Object (javax.servlet.http.HttpSession)
javax.faces.component.UIViewRoot
javax.faces.context.ExternalContext