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 javax.servlet.ServletContext |
context |
protected int |
debug |
protected String |
inputEncoding |
protected boolean |
isVirtualWebappRelative |
protected javax.servlet.http.HttpServletRequest |
req |
protected javax.servlet.http.HttpServletResponse |
res |
protected String[] |
VARIABLE_NAMES |
| Constructor and Description |
|---|
SSIServletExternalResolver(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
boolean isVirtualWebappRelative,
int debug,
String inputEncoding) |
| Modifier and Type | Method and Description |
|---|---|
void |
addVariableNames(Collection<String> variableNames)
Adds any external variables to the variableNames collection.
|
protected String |
getAbsolutePath(String path) |
protected String |
getCGIVariable(String name) |
Date |
getCurrentDate()
Returns the current date.
|
long |
getFileLastModified(String path,
boolean virtual) |
long |
getFileSize(String path,
boolean virtual) |
String |
getFileText(String originalPath,
boolean virtual) |
protected String |
getPathWithoutContext(String contextPath,
String servletPath) |
protected String |
getPathWithoutFileName(String servletPath) |
protected Object |
getReqAttributeIgnoreCase(String targetName) |
protected SSIServletExternalResolver.ServletContextAndPath |
getServletContextAndPath(String originalPath,
boolean virtual) |
protected SSIServletExternalResolver.ServletContextAndPath |
getServletContextAndPathFromNonVirtualPath(String nonVirtualPath) |
protected SSIServletExternalResolver.ServletContextAndPath |
getServletContextAndPathFromVirtualPath(String virtualPath) |
protected URLConnection |
getURLConnection(String originalPath,
boolean virtual) |
String |
getVariableValue(String name) |
protected boolean |
isNameReserved(String name) |
protected boolean |
isRootContext(javax.servlet.ServletContext servletContext) |
void |
log(String message,
Throwable throwable) |
protected String |
nullToEmptyString(String string) |
void |
setVariableValue(String name,
String value)
Set the named variable to the specified value.
|
protected final String[] VARIABLE_NAMES
protected javax.servlet.ServletContext context
protected javax.servlet.http.HttpServletRequest req
protected javax.servlet.http.HttpServletResponse res
protected boolean isVirtualWebappRelative
protected int debug
protected String inputEncoding
public SSIServletExternalResolver(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
boolean isVirtualWebappRelative,
int debug,
String inputEncoding)
public void log(String message, Throwable throwable)
log in interface SSIExternalResolverpublic void addVariableNames(Collection<String> variableNames)
SSIExternalResolveraddVariableNames in interface SSIExternalResolvervariableNames - the collection to add toprotected boolean isNameReserved(String name)
public void setVariableValue(String name, String value)
SSIExternalResolversetVariableValue in interface SSIExternalResolvername - of the variablevalue - of the variablepublic String getVariableValue(String name)
getVariableValue in interface SSIExternalResolverpublic Date getCurrentDate()
SSIExternalResolvergetCurrentDate in interface SSIExternalResolverprotected String getPathWithoutContext(String contextPath, String servletPath)
protected String getAbsolutePath(String path) throws IOException
IOExceptionprotected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPathFromNonVirtualPath(String nonVirtualPath) throws IOException
IOExceptionprotected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPathFromVirtualPath(String virtualPath) throws IOException
IOExceptionprotected boolean isRootContext(javax.servlet.ServletContext servletContext)
protected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPath(String originalPath, boolean virtual) throws IOException
IOExceptionprotected URLConnection getURLConnection(String originalPath, boolean virtual) throws IOException
IOExceptionpublic long getFileLastModified(String path, boolean virtual) throws IOException
getFileLastModified in interface SSIExternalResolverIOExceptionpublic long getFileSize(String path, boolean virtual) throws IOException
getFileSize in interface SSIExternalResolverIOExceptionpublic String getFileText(String originalPath, boolean virtual) throws IOException
getFileText in interface SSIExternalResolverIOExceptionCopyright © 2019. All rights reserved.