- cdi
- components
- contexts
- converters
- el
- eventlisteners
- exceptionhandlers
- facesviews
- filters
- functions
- managedbeans
- push
- resourcehandlers
- search
- servlets
- taghandlers
- utils
- validators
- viewhandlers
- - Ajax
- Beans
- BeansLocal
- Components
- Events
- Exceptions
- Faces
- FacesConfigXml
- FacesLocal
- JNDI
- JNDIObjectLocator
- Messages
- Servlets
- WebXml
- cdi
- components
- contexts
- converters
- el
- eventlisteners
- exceptionhandlers
- facesviews
- filters
- functions
- managedbeans
- push
- resourcehandlers
- search
- servlets
- taghandlers
- utils
- validators
- viewhandlers
- Ajax
- Beans
- BeansLocal
- Components
- Events
- Exceptions
- Faces
- FacesConfigXml
- FacesLocal
- JNDI
- JNDIObjectLocator
- Messages
- Servlets
- WebXml
Collection of utility methods for the Servlet API in general. Most of them are internally used by Faces
and FacesLocal
, however they may also be useful in a "plain vanilla" servlet or servlet filter.
There are as of now also five special methods related to JSF without needing a FacesContext
:
- The
getFacesLifecycle(ServletContext)
which returns the JSF lifecycle, allowing you a.o. to programmatically register JSF application's phase listeners. - The
isFacesAjaxRequest(HttpServletRequest)
which is capable of checking if the current request is a JSF ajax request. - The
isFacesResourceRequest(HttpServletRequest)
which is capable of checking if the current request is a JSF resource request. - The
facesRedirect(HttpServletRequest, HttpServletResponse, String, Object...)
which is capable of distinguishing JSF ajax requests from regular requests and altering the redirect logic on it, exactly like asExternalContext.redirect(String)
does. In other words, this method behaves exactly the same asFaces.redirect(String, Object...)
. - The
isFacesDevelopment(ServletContext)
which is capable of checking if the current JSF application configuration is set to development project stage.
Those methods can be used in for example a servlet filter.
Feature request
If you know more useful methods/functions which you think should be added to this OmniFaces utility class so that everyone can benefit from a "standard" JSF utility library, feel free to post a feature request.
Documentation & Sources