public class FileServlet extends GenericServlet
| Constructor and Description |
|---|
FileServlet() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(ServletConfig conf)
Initialize the servlet.
|
void |
removeCacheEntry(java.lang.String uri)
Removes an entry from the cache
|
void |
service(ServletRequest request,
ServletResponse response)
Service a request.
|
void |
setCharacterEncoding(java.lang.String encoding)
Sets the character encoding.
|
void |
setDefaultContentType(java.lang.String contentType) |
void |
setEnableRange(boolean isEnable)
Flag to disable the "Range" header.
|
void |
setGenerateSession(boolean isGenerateSession)
Flag to generate sessions on requests.
|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log, toStringpublic void setCharacterEncoding(java.lang.String encoding)
public void setDefaultContentType(java.lang.String contentType)
public void setEnableRange(boolean isEnable)
public void setGenerateSession(boolean isGenerateSession)
public void removeCacheEntry(java.lang.String uri)
public void init(ServletConfig conf) throws ServletException
GenericServletinit() instead.init in interface Servletinit in class GenericServletconf - the servlet's configurationServletExceptionpublic void service(ServletRequest request, ServletResponse response) throws ServletException, java.io.IOException
Servletservice simultaneously. Normally,
req and res will actually be
HttpServletRequest and HttpServletResponse
classes.request - request information. Normally servlets will cast this
to HttpServletRequestresponse - response information. Normally servlets will cast this
to HttpServletRequestServletExceptionjava.io.IOException