org.apache.fop.servlet
Class ServletContextURIResolver
java.lang.Object
org.apache.fop.servlet.ServletContextURIResolver
- All Implemented Interfaces:
- javax.xml.transform.URIResolver
public class ServletContextURIResolver
- extends java.lang.Object
- implements javax.xml.transform.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.
Method Summary |
javax.xml.transform.Source |
resolve(java.lang.String href,
java.lang.String base)
|
protected javax.xml.transform.Source |
resolveServletContextURI(java.lang.String path)
Resolves the "servlet-context:" URI. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVLET_CONTEXT_PROTOCOL
public static final java.lang.String SERVLET_CONTEXT_PROTOCOL
- The protocol name for the servlet context URIs.
- See Also:
- Constant Field Values
ServletContextURIResolver
public ServletContextURIResolver(javax.servlet.ServletContext servletContext)
- Main constructor
- Parameters:
servletContext
- the servlet context to access the resources through
resolve
public javax.xml.transform.Source resolve(java.lang.String href,
java.lang.String base)
throws javax.xml.transform.TransformerException
-
- Specified by:
resolve
in interface javax.xml.transform.URIResolver
- Throws:
javax.xml.transform.TransformerException
resolveServletContextURI
protected javax.xml.transform.Source resolveServletContextURI(java.lang.String path)
throws javax.xml.transform.TransformerException
- 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:
javax.xml.transform.TransformerException
- if no URL can be constructed from the path
Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.