Top Fields Constructors Methods
com.sun.faces.application.resource

public final Class Resource

extends Object
Class Inheritance
Static Imports
java.util.logging.Level.FINE, .Level.FINEST

Author
Roland Huss

Field Summary

Modifier and TypeField and Description
protected static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static URL

Returns:

an url representing the URL and on which getInputStream() can be called to get the resource
getResourceUrl
(FacesContext
the faces context from which to retrieve the resource
ctx
,
String
an URL path
path
)

Get an URL of an internal resource.

private static URL
getUrlForResourceAsStream(final ExternalContext externalContext, String path)

pack-priv static Set<String>
private static boolean
resourceExist(ExternalContext externalContext, String path)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
protected static final Logger LOGGER

Constructor Detail

Resourceback to summary
public Resource()

Method Detail

getResourceUrlback to summary
pack-priv static URL getResourceUrl(FacesContext ctx, String path) throws MalformedURLException

Get an URL of an internal resource.

First, javax.faces.context.ExternalContext#getResource(String) is checked for an non-null URL return value. In the case of a null return value (as it is the case for Weblogic 8.1 for a packed war), a URL with a special URL handler is constructed, which can be used for opening a servlet resource later.

Internally, this special URL handler will call ServletContext#getResourceAsStream(String) when an inputstream is requested. This even works on Weblogic 8.1

Parameters
ctx:FacesContext

the faces context from which to retrieve the resource

path:String

an URL path

Returns:URL

an url representing the URL and on which getInputStream() can be called to get the resource

getUrlForResourceAsStreamback to summary
private static URL getUrlForResourceAsStream(final ExternalContext externalContext, String path) throws MalformedURLException
getViewResourcePathsback to summary
pack-priv static Set<String> getViewResourcePaths(FacesContext ctx, String path)
resourceExistback to summary
private static boolean resourceExist(ExternalContext externalContext, String path)