public class FileServlet extends DynamoServlet
A FileServlet handles requests by reading the file specified by "PathTranslated" and sending that file back to the requestor. The content type of the file is determined by a MimeTyper.
A FileCache, if specified, will be used to access files. If a FileCache is not specified, then files will be read directly from the disk.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
mAllowCleanupRequest, mParametersSERVLET_INFO_KEYSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
FileServlet()
Constructs a new blank FileServlet
|
| Modifier and Type | Method and Description |
|---|---|
atg.service.filecache.FileCache |
getFileCache()
Returns the FileCache that will be used by this
|
atg.servlet.FileEncodingTyper |
getFileEncodingTyper() |
int |
getFileNotFoundCount()
Returns the number of files not found by this
|
void |
rawService(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Handles the request by serving the file.
|
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Handles the request by serving the file specified by the PathTranslated
value.
|
protected void |
serviceInclude(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse) |
void |
setFileCache(atg.service.filecache.FileCache pFileCache)
Sets the FileCache that will be used by this
|
void |
setFileEncodingTyper(atg.servlet.FileEncodingTyper pFileEncodingTyper) |
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameterdestroy, getServletConfig, getServletInfo, setServletInfogetAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatisticsaddLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningprotected void serviceInclude(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
java.io.IOExceptionjavax.servlet.ServletExceptionpublic void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
service in class DynamoServletpRequest - the request to be processedpResponse - the response object for this requestjavax.servlet.ServletException - if an error occurred while processing
the servlet requestjava.io.IOException - if an error occurred while reading or writing
the servlet requestpublic void rawService(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
Unlike service() rawService() does not set the content type, content length or last modified headers. You can use this method to serve the file programmatically after the headers for the response have already been sent.
javax.servlet.ServletException - if an error occurred while processing
the servlet requestjava.io.IOException - if an error occurred while reading or writing
the servlet requestpublic void setFileCache(atg.service.filecache.FileCache pFileCache)
public atg.service.filecache.FileCache getFileCache()
public void setFileEncodingTyper(atg.servlet.FileEncodingTyper pFileEncodingTyper)
public atg.servlet.FileEncodingTyper getFileEncodingTyper()
public int getFileNotFoundCount()