// jsf 2.0 : get the current ResourceHandler and
// check if it is a resource request, if true
// delegate to ResourceHandler, else continue with
// the lifecycle.
// Acquire the ResourceHandler for this request by calling Application.getResourceHandler().
ResourceHandler resourceHandler = facesContext.getApplication().getResourceHandler();
// Call ResourceHandler.isResourceRequest(javax.faces.context.FacesContext).
if (resourceHandler.isResourceRequest(facesContext))
{
// If this returns true call ResourceHandler.handleResourceRequest(javax.faces.context.FacesContext).
resourceHandler.handleResourceRequest(facesContext);
}
else
{
// If this returns false, handle as follows:
// call Lifecycle.execute(javax.faces.context.FacesContext)