All Packages Class Hierarchy This Package Previous Next Index
Interface Acme.Serve.servlet.Servlet
- public interface Servlet
The servlet interface.
Servlets are little Java programs that can be hooked into a
server and run in response to requests.
Servlet has to be an interface so that things that must inherit
from another object, such as RMI, can also be Servlets. However,
most of the time a Servlet will not need to be anything else, and
it will be somewhat more convenient to extend GenericServlet.
This is taken from JavaSoft's Servlet API documentation.
Fetch the software.
Fetch the entire Acme package.
- See Also:
- GenericServlet, HttpServlet, SampleServlet, Serve
-
destroy()
- Destroys the servlet and cleans up whatever resources are being held.
-
getServletConfig()
- Returns a servlet config object, which contains any initialization
parameters and startup configuration for this servlet.
-
getServletInfo()
- Returns a string containing information about the author, version, and
copyright of the servlet.
-
init(ServletConfig)
- Initializes the servlet.
-
service(ServletRequest, ServletResponse)
- Services a single request from the client.
init
public abstract void init(ServletConfig config) throws ServletException
- Initializes the servlet.
This is called by the system when the servlet is first loaded.
- Parameters:
- config - servlet initialization information
- Throws: ServletException
- when an exception has occurred
getServletConfig
public abstract ServletConfig getServletConfig()
- Returns a servlet config object, which contains any initialization
parameters and startup configuration for this servlet.
service
public abstract void service(ServletRequest req,
ServletResponse res) throws ServletException, IOException
- Services a single request from the client.
Note that the server only creates a single instance of your Servlet
subclass, and calls the service() method of that one instance multiple
times, possibly at the same time in different threads. This is somewhat
unusual in the Java world. The implication is that any instance
variables in your class behave more like class variables - they are
shared among multiple concurrent calls. So, be careful.
- Parameters:
- req - the servlet request
- req - the servlet response
- Throws: ServletException
- when a servlet exception has occurred
- Throws: IOException
- when an I/O exception has occurred
getServletInfo
public abstract String getServletInfo()
- Returns a string containing information about the author, version, and
copyright of the servlet.
destroy
public abstract void destroy()
- Destroys the servlet and cleans up whatever resources are being held.
This is called by the system when the servlet is being destroyed.
All Packages Class Hierarchy This Package Previous Next Index
ACME Java ACME Labs