private URL getRelativePath ( FacesContext facesContext , String path ) throws IOException { URL url = ( URL ) _relativePaths . get ( path ) ; if ( url == null ) { url = _factory . resolveURL ( facesContext , _src , path ) ; if ( url != null ) { ViewResource viewResource = ( ViewResource ) facesContext . getAttributes ( ) . get ( FaceletFactory . LAST_RESOURCE_RESOLVED ) ; if ( viewResource != null ) { // If a view resource has been used to resolve a resource, the cache is in // the ResourceHandler implementation. No need to cache in _relativeLocations. } else { _relativePaths . put ( path , url ) ; } } } return url ; }
Delegates resolution to DefaultFaceletFactory reference . Also caches URLs for relative paths .