public class ServletContextURIResolver extends Object implements URIResolver
Modifier and Type | Field and Description |
---|---|
static String |
SERVLET_CONTEXT_PROTOCOL
The protocol name for the servlet context URIs.
|
Constructor and Description |
---|
ServletContextURIResolver(jakarta.servlet.ServletContext servletContext)
Main constructor
|
Modifier and Type | Method and Description |
---|---|
Source |
resolve(String href,
String base) |
protected Source |
resolveServletContextURI(String path)
Resolves the "servlet-context:" URI.
|
public static final String SERVLET_CONTEXT_PROTOCOL
public ServletContextURIResolver(jakarta.servlet.ServletContext servletContext)
servletContext
- the servlet context to access the resources throughpublic Source resolve(String href, String base) throws TransformerException
resolve
in interface URIResolver
TransformerException
protected Source resolveServletContextURI(String path) throws TransformerException
path
- the path part after the protocol (should start with a "/")TransformerException
- if no URL can be constructed from the pathCopyright © 2025 Apache Software Foundation. All rights reserved.