public class SSIServletExternalResolver extends java.lang.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 java.lang.String |
inputEncoding |
protected boolean |
isVirtualWebappRelative |
protected HttpServletRequest |
req |
protected HttpServletResponse |
res |
protected java.lang.String[] |
VARIABLE_NAMES |
Constructor and Description |
---|
SSIServletExternalResolver(ServletContext context,
HttpServletRequest req,
HttpServletResponse res,
boolean isVirtualWebappRelative,
int debug,
java.lang.String inputEncoding) |
Modifier and Type | Method and Description |
---|---|
void |
addVariableNames(java.util.Collection<java.lang.String> variableNames)
Adds any external variables to the variableNames collection.
|
protected java.lang.String |
getAbsolutePath(java.lang.String path) |
protected java.lang.String |
getCGIVariable(java.lang.String name) |
java.util.Date |
getCurrentDate()
Returns the current date.
|
long |
getFileLastModified(java.lang.String path,
boolean virtual) |
long |
getFileSize(java.lang.String path,
boolean virtual) |
java.lang.String |
getFileText(java.lang.String originalPath,
boolean virtual) |
protected java.lang.String |
getPathWithoutContext(java.lang.String contextPath,
java.lang.String servletPath) |
protected java.lang.String |
getPathWithoutFileName(java.lang.String servletPath) |
protected java.lang.Object |
getReqAttributeIgnoreCase(java.lang.String targetName) |
protected SSIServletExternalResolver.ServletContextAndPath |
getServletContextAndPath(java.lang.String originalPath,
boolean virtual) |
protected SSIServletExternalResolver.ServletContextAndPath |
getServletContextAndPathFromNonVirtualPath(java.lang.String nonVirtualPath) |
protected SSIServletExternalResolver.ServletContextAndPath |
getServletContextAndPathFromVirtualPath(java.lang.String virtualPath) |
protected java.net.URLConnection |
getURLConnection(java.lang.String originalPath,
boolean virtual) |
java.lang.String |
getVariableValue(java.lang.String name) |
protected boolean |
isNameReserved(java.lang.String name) |
protected boolean |
isRootContext(ServletContext servletContext) |
void |
log(java.lang.String message,
java.lang.Throwable throwable) |
protected java.lang.String |
nullToEmptyString(java.lang.String string) |
void |
setVariableValue(java.lang.String name,
java.lang.String value)
Set the named variable to the specified value.
|
protected final java.lang.String[] VARIABLE_NAMES
protected ServletContext context
protected HttpServletRequest req
protected HttpServletResponse res
protected boolean isVirtualWebappRelative
protected int debug
protected java.lang.String inputEncoding
public SSIServletExternalResolver(ServletContext context, HttpServletRequest req, HttpServletResponse res, boolean isVirtualWebappRelative, int debug, java.lang.String inputEncoding)
public void log(java.lang.String message, java.lang.Throwable throwable)
log
in interface SSIExternalResolver
public void addVariableNames(java.util.Collection<java.lang.String> variableNames)
SSIExternalResolver
addVariableNames
in interface SSIExternalResolver
variableNames
- the collection to add toprotected java.lang.Object getReqAttributeIgnoreCase(java.lang.String targetName)
protected boolean isNameReserved(java.lang.String name)
public void setVariableValue(java.lang.String name, java.lang.String value)
SSIExternalResolver
setVariableValue
in interface SSIExternalResolver
name
- of the variablevalue
- of the variablepublic java.lang.String getVariableValue(java.lang.String name)
getVariableValue
in interface SSIExternalResolver
protected java.lang.String getCGIVariable(java.lang.String name)
public java.util.Date getCurrentDate()
SSIExternalResolver
getCurrentDate
in interface SSIExternalResolver
protected java.lang.String nullToEmptyString(java.lang.String string)
protected java.lang.String getPathWithoutFileName(java.lang.String servletPath)
protected java.lang.String getPathWithoutContext(java.lang.String contextPath, java.lang.String servletPath)
protected java.lang.String getAbsolutePath(java.lang.String path) throws java.io.IOException
java.io.IOException
protected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPathFromNonVirtualPath(java.lang.String nonVirtualPath) throws java.io.IOException
java.io.IOException
protected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPathFromVirtualPath(java.lang.String virtualPath) throws java.io.IOException
java.io.IOException
protected boolean isRootContext(ServletContext servletContext)
protected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPath(java.lang.String originalPath, boolean virtual) throws java.io.IOException
java.io.IOException
protected java.net.URLConnection getURLConnection(java.lang.String originalPath, boolean virtual) throws java.io.IOException
java.io.IOException
public long getFileLastModified(java.lang.String path, boolean virtual) throws java.io.IOException
getFileLastModified
in interface SSIExternalResolver
java.io.IOException
public long getFileSize(java.lang.String path, boolean virtual) throws java.io.IOException
getFileSize
in interface SSIExternalResolver
java.io.IOException
public java.lang.String getFileText(java.lang.String originalPath, boolean virtual) throws java.io.IOException
getFileText
in interface SSIExternalResolver
java.io.IOException
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.