}
catch (IOException e)
{
throw new FacesException(e);
}*/
ViewResource resource = facesContext.getApplication().
getResourceHandler().createViewResource(facesContext, path);
//return resource == null ? null : resource.getURL();
if (resource != null)
{
facesContext.getAttributes().put(FaceletFactory.LAST_RESOURCE_RESOLVED, resource);
return resource.getURL();
}
else
{
return null;
}