|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.web.ServletInitializer
public class ServletInitializer
Encapsulates all initialization and configuration needed by the OpenNMS servlets and JSPs.
| Field Summary | |
|---|---|
protected static DbConnectionFactory |
factory
A reference to the factory we set in Vaultduring
initso we can destroy it in destroy. |
| Method Summary | |
|---|---|
static void |
destroy(ServletContext context)
Releases all shared resources on the first invocation of this method. |
static String |
getHomeDir()
Deprecated. Use Vault.getHomeDirinstead. |
static void |
init(ServletContext context)
Initialize servlet and JSP configuration on the first invocation of this method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static DbConnectionFactory factory
Vaultduring
initso we can destroy it in destroy.
Maybe there's a better way to do this then storing a reference? Should we
just add a method to Vault?
This reference also serves as a flag to determine whether or not this class has been initialized yet. If it is null, the class has not yet been initialized.
| Method Detail |
|---|
public static void init(ServletContext context)
throws ServletException
Call this method in the init method of your servlet or
JSP. It will read the servlet initialization parameters from the
ServletConfig and ServletContext and
OpenNMS configuration files.
context - the ServletContext instance in which your
servlet is running
ServletException
public static void destroy(ServletContext context)
throws ServletException
Call this method in the destroy method of your servlet or
JSP.
context - the ServletContext instance in which your
servlet is running
ServletExceptionpublic static String getHomeDir()
Vault.getHomeDirinstead.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||