com.caucho.server.http
Class FileServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--com.caucho.server.http.FileServlet
All Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig

public class FileServlet
extends GenericServlet

Serves static files. The cache headers are automatically set on these files.

See Also:
Serialized Form

Constructor Summary
FileServlet()
           
 
Method Summary
 void init(ServletConfig conf)
          Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
 void service(ServletRequest request, ServletResponse response)
          Called by the servlet container to allow the servlet to respond to a request.
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileServlet

public FileServlet()
Method Detail

init

public void init(ServletConfig conf)
          throws ServletException
Description copied from class: GenericServlet
Called by the servlet container to indicate to a servlet that the servlet is being placed into service. See Servlet.init(javax.servlet.ServletConfig).

This implementation stores the ServletConfig object it receives from the servlet container for later use. When overriding this form of the method, call super.init(config).

Overrides:
init in class GenericServlet
Following copied from class: javax.servlet.GenericServlet
Parameters:
config - the ServletConfig object that contains configutation information for this servlet
Throws:
ServletException - if an exception occurs that interrupts the servlet's normal operation
See Also:
UnavailableException

service

public void service(ServletRequest request,
                    ServletResponse response)
             throws ServletException,
                    java.io.IOException
Description copied from class: GenericServlet
Called by the servlet container to allow the servlet to respond to a request. See Servlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse).

This method is declared abstract so subclasses, such as HttpServlet, must override it.

Overrides:
service in class GenericServlet
Following copied from class: javax.servlet.GenericServlet
Parameters:
req - the ServletRequest object that contains the client's request
res - the ServletResponse object that will contain the servlet's response
Throws:
ServletException - if an exception occurs that interferes with the servlet's normal operation occurred
java.io.IOException - if an input or output exception occurs