org.apache.catalina.ssi

Class SSIServletExternalResolver

public class SSIServletExternalResolver extends Object implements SSIExternalResolver

An implementation of SSIExternalResolver that is used with servlets.

Version: $Revision: 739532 $, $Date: 2009-01-31 10:52:13 +0100 (Sat, 31 Jan 2009) $

Author: Dan Sandberg David Becker

Nested Class Summary
protected classSSIServletExternalResolver.ServletContextAndPath
Field Summary
protected ServletContextcontext
protected intdebug
protected StringinputEncoding
protected booleanisVirtualWebappRelative
protected HttpServletRequestreq
protected HttpServletResponseres
protected String[]VARIABLE_NAMES
Constructor Summary
SSIServletExternalResolver(ServletContext context, HttpServletRequest req, HttpServletResponse res, boolean isVirtualWebappRelative, int debug, String inputEncoding)
Method Summary
voidaddVariableNames(Collection variableNames)
protected StringgetAbsolutePath(String path)
protected StringgetCGIVariable(String name)
DategetCurrentDate()
longgetFileLastModified(String path, boolean virtual)
longgetFileSize(String path, boolean virtual)
StringgetFileText(String originalPath, boolean virtual)
protected StringgetPathWithoutContext(String contextPath, String servletPath)
protected StringgetPathWithoutFileName(String servletPath)
protected ObjectgetReqAttributeIgnoreCase(String targetName)
protected SSIServletExternalResolver.ServletContextAndPathgetServletContextAndPath(String originalPath, boolean virtual)
protected SSIServletExternalResolver.ServletContextAndPathgetServletContextAndPathFromNonVirtualPath(String nonVirtualPath)
protected SSIServletExternalResolver.ServletContextAndPathgetServletContextAndPathFromVirtualPath(String virtualPath)
protected URLConnectiongetURLConnection(String originalPath, boolean virtual)
StringgetVariableValue(String name)
protected booleanisNameReserved(String name)
protected booleanisRootContext(ServletContext servletContext)
voidlog(String message, Throwable throwable)
protected StringnullToEmptyString(String string)
voidsetVariableValue(String name, String value)

Field Detail

context

protected ServletContext context

debug

protected int debug

inputEncoding

protected String inputEncoding

isVirtualWebappRelative

protected boolean isVirtualWebappRelative

req

protected HttpServletRequest req

res

protected HttpServletResponse res

VARIABLE_NAMES

protected final String[] VARIABLE_NAMES

Constructor Detail

SSIServletExternalResolver

public SSIServletExternalResolver(ServletContext context, HttpServletRequest req, HttpServletResponse res, boolean isVirtualWebappRelative, int debug, String inputEncoding)

Method Detail

addVariableNames

public void addVariableNames(Collection variableNames)

getAbsolutePath

protected String getAbsolutePath(String path)

getCGIVariable

protected String getCGIVariable(String name)

getCurrentDate

public Date getCurrentDate()

getFileLastModified

public long getFileLastModified(String path, boolean virtual)

getFileSize

public long getFileSize(String path, boolean virtual)

getFileText

public String getFileText(String originalPath, boolean virtual)

getPathWithoutContext

protected String getPathWithoutContext(String contextPath, String servletPath)

getPathWithoutFileName

protected String getPathWithoutFileName(String servletPath)

getReqAttributeIgnoreCase

protected Object getReqAttributeIgnoreCase(String targetName)

getServletContextAndPath

protected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPath(String originalPath, boolean virtual)

getServletContextAndPathFromNonVirtualPath

protected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPathFromNonVirtualPath(String nonVirtualPath)

getServletContextAndPathFromVirtualPath

protected SSIServletExternalResolver.ServletContextAndPath getServletContextAndPathFromVirtualPath(String virtualPath)

getURLConnection

protected URLConnection getURLConnection(String originalPath, boolean virtual)

getVariableValue

public String getVariableValue(String name)

isNameReserved

protected boolean isNameReserved(String name)

isRootContext

protected boolean isRootContext(ServletContext servletContext)

log

public void log(String message, Throwable throwable)

nullToEmptyString

protected String nullToEmptyString(String string)

setVariableValue

public void setVariableValue(String name, String value)
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.