public class ServletContextURIResolver
extends java.lang.Object
implements javax.xml.transform.URIResolver
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SERVLET_CONTEXT_PROTOCOL
The protocol name for the servlet context URIs.
|
| Constructor and Description |
|---|
ServletContextURIResolver(javax.servlet.ServletContext servletContext)
Main constructor
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final java.lang.String SERVLET_CONTEXT_PROTOCOL
public ServletContextURIResolver(javax.servlet.ServletContext servletContext)
servletContext - the servlet context to access the resources throughpublic javax.xml.transform.Source resolve(java.lang.String href,
java.lang.String base)
throws javax.xml.transform.TransformerException
resolve in interface javax.xml.transform.URIResolverjavax.xml.transform.TransformerExceptionprotected javax.xml.transform.Source resolveServletContextURI(java.lang.String path)
throws javax.xml.transform.TransformerException
path - the path part after the protocol (should start with a "/")javax.xml.transform.TransformerException - if no URL can be constructed from the pathCopyright 1999-2022 The Apache Software Foundation. All Rights Reserved.