public class BaseStartup
extends javax.servlet.http.HttpServlet
Unlike a typical servlet class, this servlet's methods are only invoked
during application startup-shutdown and never during normal processing. The
init method is automatically invoked during application startup and
the destroy method is automatically invoked during application
shutdown.
The automatic invocation of the init and destroy methods
is triggered due to this class' definition in the web application's web.xml
file. The definition includes a <load-on-startup> directive as
shown below.
<servlet id="Servlet_BaseStartup">
<servlet-name>BaseStartup</servlet-name>
<display-name>BaseStartup</display-name>
<servlet-class>com.dpslink.base.servlet.BaseStartup</servlet-class>
<load-on-startup>100</load-on-startup>
</servlet>
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
| Constructor and Description |
|---|
BaseStartup() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Handles web application shutdown processing.
|
protected void |
destroyImpl()
Provides additional application-specific functionality for shutdown
processing.
|
void |
init()
Handles web application startup processing.
|
protected void |
initImpl()
Provides additional application-specific functionality for startup
processing.
|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, serviceprivate static final long serialVersionUID
public void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletException - - if an error occurs during processing.protected void initImpl()
init method. Subclasses should
override this method to provide application-specific processing.public void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletprotected void destroyImpl()
destroy method. Subclasses should
override this method to provide application-specific processing.