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.
-
Servlet()
-
-
destroy()
- Destroys the servlet and cleans up whatever resources are being
held.
-
getInitParameter(String)
- Gets an initialization parameter of the servlet.
-
getServletContext()
- Returns the servlet context.
-
getServletInfo()
- Returns a string containing information about the author, version,
and copyright of the servlet.
-
init()
- Initializes the servlet.
-
log(String)
- Logs a message into the servlet log file.
-
service(ServletRequest, ServletResponse)
- Services a single request from the client.
-
setStub(ServletStub)
- Sets the servlet stub.
Servlet
public Servlet()
setStub
public final void setStub(ServletStub stub)
- Sets the servlet stub. This is done automatically by the system.
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.
getInitParameter
public String getInitParameter(String name)
- Gets an initialization parameter of the servlet.
- Parameters:
- name - the parameter name
log
public void log(String msg)
- Logs a message into the servlet log file.
- Parameters:
- msg - the message string
getServletInfo
public String getServletInfo()
- Returns a string containing information about the author, version,
and copyright of the servlet.
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
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
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