{
FacesContext facesContext = FacesContext.getCurrentInstance();
if (TempDirFileCacheResourceLoader.isValidCreateTemporalFiles(facesContext))
{
_viewResourceLoaders = new ResourceLoader[] {
new RootExternalContextResourceLoader(),
new TempDirFileCacheResourceLoader(new FacesFlowClassLoaderResourceLoader())
};
}
else
{
_viewResourceLoaders = new ResourceLoader[] {
new RootExternalContextResourceLoader(),
new FacesFlowClassLoaderResourceLoader()
};
}
}
return _viewResourceLoaders;