Class java.servlet.Servlet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.servlet.Servlet

java.lang.Object
   |
   +----java.servlet.Servlet

public class Servlet
extends Object
Base servlet class.

Constructor Index

 o Servlet()

Method Index

 o destroy()
Destroys the servlet and cleans up whatever resources are being held.
 o getInitParameter(String)
Gets an initialization parameter of the servlet.
 o getServletContext()
Returns the servlet context.
 o getServletInfo()
Returns a string containing information about the author, version, and copyright of the servlet.
 o init()
Initializes the servlet.
 o log(String)
Logs a message into the servlet log file.
 o service(ServletRequest, ServletResponse)
Services a single request from the client.
 o setStub(ServletStub)
Sets the servlet stub.

Constructors

 o Servlet
  public Servlet()

Methods

 o setStub
  public final void setStub(ServletStub stub)
Sets the servlet stub. This is done automatically by the system.
 o getServletContext
  public ServletContext getServletContext()
Returns the servlet context. The servlet context lets a servlet access the environment of the server in which it is running.
 o getInitParameter
  public String getInitParameter(String name)
Gets an initialization parameter of the servlet.
Parameters:
name - the parameter name
 o log
  public void log(String msg)
Logs a message into the servlet log file.
Parameters:
msg - the message string
 o getServletInfo
  public String getServletInfo()
Returns a string containing information about the author, version, and copyright of the servlet.
 o init
  public void init() throws Exception
Initializes the servlet. This is called automatically by the system when the servlet is first loaded.
Throws: Exception
if an exception has occurred
 o service
  public void service(ServletRequest req,
                      ServletResponse res) throws Exception
Services a single request from the client.
Parameters:
req - the servlet request
req - the servlet response
Throws: Exception
if an exception has occurred
 o destroy
  public void destroy() throws Exception
Destroys the servlet and cleans up whatever resources are being held.
Throws: Exception
if an exception has occurred

All Packages  Class Hierarchy  This Package  Previous  Next  Index