public class SSIServletExternalResolver extends Object implements SSIExternalResolver
Modifier and Type | Class and Description |
---|---|
protected static class |
SSIServletExternalResolver.ServletContextAndPath |
Modifier and Type | Field and Description |
---|---|
protected ServletContext |
context |
protected int |
debug |
protected String |
inputEncoding |
protected boolean |
isVirtualWebappRelative |
protected HttpServletRequest |
req |
protected HttpServletResponse |
res |
protected String[] |
VARIABLE_NAMES |
Constructor and Description |
---|
SSIServletExternalResolver(ServletContext context,
HttpServletRequest req,
HttpServletResponse res,
boolean isVirtualWebappRelative,
int debug,
String inputEncoding) |
protected final String[] VARIABLE_NAMES
protected final ServletContext context
protected final HttpServletRequest req
protected final HttpServletResponse res
protected final boolean isVirtualWebappRelative
protected final int debug
protected final String inputEncoding
public SSIServletExternalResolver(ServletContext context, HttpServletRequest req, HttpServletResponse res, boolean isVirtualWebappRelative, int debug, String inputEncoding)
public void log(String message, Throwable throwable)
log
in interface SSIExternalResolver
public void addVariableNames(Collection<String> variableNames)
SSIExternalResolver
addVariableNames
in interface SSIExternalResolver
variableNames
- the collection to add toprotected boolean isNameReserved(String name)
public void setVariableValue(String name, String value)
SSIExternalResolver
setVariableValue
in interface SSIExternalResolver
name
- of the variablevalue
- of the variablepublic String getVariableValue(String name)
getVariableValue
in interface SSIExternalResolver
public Date getCurrentDate()
SSIExternalResolver
getCurrentDate
in interface SSIExternalResolver
protected String getPathWithoutContext(String contextPath, String servletPath)
protected String getAbsolutePath(String path) throws IOException
IOException
protected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPathFromNonVirtualPath(String nonVirtualPath) throws IOException
IOException
protected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPathFromVirtualPath(String virtualPath) throws IOException
IOException
protected boolean isRootContext(ServletContext servletContext)
protected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPath(String originalPath, boolean virtual) throws IOException
IOException
protected URLConnection getURLConnection(String originalPath, boolean virtual) throws IOException
IOException
public long getFileLastModified(String path, boolean virtual) throws IOException
getFileLastModified
in interface SSIExternalResolver
IOException
public long getFileSize(String path, boolean virtual) throws IOException
getFileSize
in interface SSIExternalResolver
IOException
public String getFileText(String originalPath, boolean virtual) throws IOException
getFileText
in interface SSIExternalResolver
IOException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.