|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--javax.servlet.GenericServlet
GenericServlet is a convenient abstract class for defining Servlets. Servlets which need more control than HttpServlet can extend GenericServlet.
In addition, GenericServlet implements ServletConfig to make it easier to get configuration information.
| Constructor Summary | |
GenericServlet()
|
|
| Method Summary | |
void |
destroy()
Called when the servlet (and the application) shuts down. |
java.lang.String |
getInitParameter(java.lang.String name)
Returns an initialization parameter. |
java.util.Enumeration |
getInitParameterNames()
Enumerates all the initialization parameter. |
ServletConfig |
getServletConfig()
Returns this servlet's configuration. |
ServletContext |
getServletContext()
Returns the application (servlet context) that the servlet belongs to. |
java.lang.String |
getServletInfo()
Returns a string describing the servlet. |
java.lang.String |
getServletName()
Returns the servlet name for this configuration. |
void |
init()
Initialize the servlet. |
void |
init(ServletConfig config)
Initialize the servlet. |
void |
log(java.lang.String message)
Logs an error message in the application's log. |
void |
log(java.lang.String message,
java.lang.Throwable cause)
Logs an error message and an exception trace in the application's log. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.Servlet |
service |
| Constructor Detail |
public GenericServlet()
| Method Detail |
public void init(ServletConfig config)
throws ServletException
init() instead.init in interface Servletconfig - the servlet's configuration
public void init()
throws ServletException
public ServletConfig getServletConfig()
getServletConfig in interface Servletpublic java.lang.String getServletName()
<servlet servlet-name='myservlet'
servlet-class='test.MyServlet'/>
getServletName in interface ServletConfigpublic java.lang.String getInitParameter(java.lang.String name)
<servlet servlet-name='myservlet'
servlet-class='test.MyServlet'>
<init-param param1='value1'/>
<init-param param2='value2'/>
</servlet>
getInitParameter in interface ServletConfigname - of the parameterpublic java.util.Enumeration getInitParameterNames()
getInitParameterNames in interface ServletConfigpublic ServletContext getServletContext()
getServletContext in interface ServletConfigpublic java.lang.String getServletInfo()
getServletInfo in interface Servletpublic void log(java.lang.String message)
public void log(java.lang.String message,
java.lang.Throwable cause)
public void destroy()
destroy in interface Servlet
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||