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 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(javax.servlet.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 © 2019. All rights reserved.