Package org.apache.fop.servlet
Class ServletContextURIResolver
java.lang.Object
org.apache.fop.servlet.ServletContextURIResolver
- All Implemented Interfaces:
URIResolver
This class is a URIResolver implementation that provides access to resources in the WEB-INF
directory of a web application using "servlet-content:" URIs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The protocol name for the servlet context URIs. -
Constructor Summary
ConstructorsConstructorDescriptionServletContextURIResolver
(javax.servlet.ServletContext servletContext) Main constructor -
Method Summary
-
Field Details
-
SERVLET_CONTEXT_PROTOCOL
The protocol name for the servlet context URIs.- See Also:
-
-
Constructor Details
-
ServletContextURIResolver
public ServletContextURIResolver(javax.servlet.ServletContext servletContext) Main constructor- Parameters:
servletContext
- the servlet context to access the resources through
-
-
Method Details
-
resolve
- Specified by:
resolve
in interfaceURIResolver
- Throws:
TransformerException
-
resolveServletContextURI
Resolves the "servlet-context:" URI.- Parameters:
path
- the path part after the protocol (should start with a "/")- Returns:
- the resolved Source or null if the resource was not found
- Throws:
TransformerException
- if no URL can be constructed from the path
-