Class sun.server.http.FileServlet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.http.FileServlet

java.lang.Object
   |
   +----java.servlet.GenericServlet
           |
           +----java.servlet.http.HttpServlet
                   |
                   +----sun.server.http.FileServlet

public class FileServlet
extends HttpServlet
Servlet for handling file GET and HEAD requests.

Constructor Index

 o FileServlet()
Creates a new file servlet.

Method Index

 o flushCache()
Flushes file RAM cache.
 o getServletInfo()
Returns information about this servlet.
 o init(ServletStub)
Initializes the file servlet.
 o sendResponse(HttpServletRequest, HttpServletResponse, boolean, boolean)
Sends the response to a file GET or HEAD request back to the client.
 o service(HttpServletRequest, HttpServletResponse)
Services a single file request from the client.

Constructors

 o FileServlet
  public FileServlet()
Creates a new file servlet.

Methods

 o init
  public void init(ServletStub stub) throws ServletException
Initializes the file servlet.
Overrides:
init in class GenericServlet
 o service
  public void service(HttpServletRequest req,
                      HttpServletResponse res) throws ServletException, IOException
Services a single file request from the client.
Parameters:
req - the servlet request
res - the servlet response
Throws: IOException
if an I/O error has occurred
Overrides:
service in class HttpServlet
 o sendResponse
  protected void sendResponse(HttpServletRequest req,
                              HttpServletResponse res,
                              boolean doGet,
                              boolean noCache) throws IOException
Sends the response to a file GET or HEAD request back to the client.
Parameters:
req - the servlet request
res - the servlet response
doGet - true if this is a full get request
noCache - true if cache is disabled
Throws: IOException
if an I/O error has occurred
 o getServletInfo
  public String getServletInfo()
Returns information about this servlet.
Overrides:
getServletInfo in class GenericServlet
 o flushCache
  public void flushCache()
Flushes file RAM cache.

All Packages  Class Hierarchy  This Package  Previous  Next  Index