Package org.joinfaces
Class FacesContextUtils
java.lang.Object
org.springframework.web.jsf.FacesContextUtils
org.joinfaces.FacesContextUtils
Extension of Springs own
FacesContextUtils.-
Method Summary
Modifier and TypeMethodDescriptionstatic WebApplicationContextgetRequiredWebApplicationContext(ExternalContext externalContext) Find the rootWebApplicationContextfor this web app.static ServletContextgetServletContext(ExternalContext externalContext) Returns theServletContextfor the givenExternalContext.static WebApplicationContextgetWebApplicationContext(ExternalContext externalContext) Find the rootWebApplicationContextfor this web app.Methods inherited from class org.springframework.web.jsf.FacesContextUtils
getRequiredWebApplicationContext, getSessionMutex, getWebApplicationContext
-
Method Details
-
getServletContext
Returns theServletContextfor the givenExternalContext.- Parameters:
externalContext- theExternalContextto find theServletContextfor.- Returns:
- the ServletContext for the given ExternalContext
-
getWebApplicationContext
@Nullable public static WebApplicationContext getWebApplicationContext(ExternalContext externalContext) Find the rootWebApplicationContextfor this web app.- Parameters:
externalContext- The ExternalContext to find the web application context for- Returns:
- the root WebApplicationContext for this web app, or
nullif none - See Also:
-
getRequiredWebApplicationContext
@NonNull public static WebApplicationContext getRequiredWebApplicationContext(ExternalContext externalContext) Find the rootWebApplicationContextfor this web app.- Parameters:
externalContext- The ExternalContext to find the web application context for- Returns:
- the root WebApplicationContext for this web app
- See Also:
-