Klasse Resource
java.lang.Object
org.apache.myfaces.tobago.facelets.Resource
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic URL
getResourceUrl
(javax.faces.context.FacesContext ctx, String path) Get an URL of an internal resource.
-
Methodendetails
-
getResourceUrl
public static URL getResourceUrl(javax.faces.context.FacesContext ctx, String path) throws MalformedURLException Get an URL of an internal resource. First,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 serlvet resource later. Internally, this special URL handler will callServletContext.getResourceAsStream(String)
when an inputstream is requested. This works even on Weblogic 8.1- Parameter:
ctx
- the faces context from which to retrieve the resourcepath
- an URL path- Gibt zurück:
- an url representing the URL and on which getInputStream() can be called to get the resource
- Löst aus:
MalformedURLException
-