|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.nucleus.TimedOperationService atg.nucleus.servlet.ServletService atg.nucleus.servlet.HttpServletService atg.servlet.DynamoServlet atg.servlet.FileServlet
public class FileServlet
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.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.servlet.DynamoServlet |
---|
mAllowCleanupRequest, mParameters |
Fields inherited from class atg.nucleus.servlet.ServletService |
---|
SERVLET_INFO_KEY |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
FileServlet()
Constructs a new blank FileServlet |
Method Summary | |
---|---|
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)
|
Methods inherited from class atg.servlet.DynamoServlet |
---|
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter |
Methods inherited from class atg.nucleus.servlet.ServletService |
---|
destroy, getServletConfig, getServletInfo, init, setServletInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public FileServlet()
Method Detail |
---|
protected void serviceInclude(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
service
in class DynamoServlet
pRequest
- the request to be processedpResponse
- the response object for this request
javax.servlet.ServletException
- if an error occurred while processing
the servlet request
java.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 request
java.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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |