Serializable
, Servlet
, ServletConfig
HttpServlet
public abstract class GenericServlet extends Object implements Servlet, ServletConfig, Serializable
Constructor | Description |
---|---|
GenericServlet() |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
destroy() |
Destroy the servlet.
|
String |
getInitParameter(String name) |
Get the init parameter.
|
Enumeration<String> |
getInitParameterNames() |
Get the init parameter names.
|
ServletConfig |
getServletConfig() |
Get the servlet config.
|
ServletContext |
getServletContext() |
Get the servlet context.
|
String |
getServletInfo() |
Get the servlet info.
|
String |
getServletName() |
Get the servlet name.
|
void |
init() |
Init the servlet.
|
void |
init(ServletConfig config) |
Called by the servlet container to indicate to a servlet that the servlet
is being placed into service.
|
void |
log(String message) |
Log the message.
|
void |
log(String message,
Throwable throwable) |
Log the message.
|
abstract void |
service(ServletRequest request,
ServletResponse response) |
Process the request.
|
public String getInitParameter(String name)
getInitParameter
in interface ServletConfig
name
- the name.public Enumeration<String> getInitParameterNames()
getInitParameterNames
in interface ServletConfig
public ServletConfig getServletConfig()
getServletConfig
in interface Servlet
public ServletContext getServletContext()
getServletContext
in interface ServletConfig
public String getServletInfo()
getServletInfo
in interface Servlet
public String getServletName()
getServletName
in interface ServletConfig
public void init(ServletConfig config) throws ServletException
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)
.
init
in interface Servlet
config
- the ServletConfig
object that contains
configutation information for this servletServletException
- if an exception occurs that interrupts the
servlet's normal operationUnavailableException
public void init() throws ServletException
ServletException
- when a servlet error occurs.public void log(String message)
message
- the message.public void log(String message, Throwable throwable)
message
- the message.throwable
- the throwable.public abstract void service(ServletRequest request, ServletResponse response) throws ServletException, IOException
service
in interface Servlet
request
- the request.response
- the response.IOException
- when an I/O error occurs.ServletException
- when a servlet error occurs.Copyright © 2020 Piranha Cloud. All rights reserved.