|
|||||||||
| 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 |
| Constructor Detail |
public GenericServlet()
| Method Detail |
public void init(ServletConfig config)
throws ServletException
init() instead.config - the servlet's configuration
public void init()
throws ServletException
public ServletConfig getServletConfig()
public java.lang.String getServletName()
<servlet servlet-name='myservlet'
servlet-class='test.MyServlet'/>
public 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>
name - of the parameterpublic java.util.Enumeration getInitParameterNames()
public ServletContext getServletContext()
public java.lang.String getServletInfo()
public void log(java.lang.String message)
public void log(java.lang.String message,
java.lang.Throwable cause)
public void destroy()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||