This servlet should have a lower load-on-startup value
in web.xml than any servlets that access the root web
application context.
Note that this class has been deprecated for containers implementing
Servlet API 2.4 or higher, in favor of ContextLoaderListener.
According to Servlet 2.4, listeners must be initialized before load-on-startup
servlets. Many Servlet 2.3 containers already enforce this behavior. If you
use such a container, this servlet can be replaced with ContextLoaderListener.
Else or if working with a Servlet 2.2 container, stick with this servlet.
Servlet 2.3 containers known to work with bootstrap listeners are:
Servlet 2.3 containers known not to work with bootstrap listeners are:
So unfortunately, the only context initialization option that is compatible with all Servlet 2.3 containers is this servlet.
Note that a startup failure of this servlet will not stop the rest of the web application from starting, in contrast to a listener failure. This can lead to peculiar side effects if other servlets get started that depend on initialization of the root web application context.
| Constructor Summary |
|---|
|
No description provided. |
| Method Summary | |
|---|---|
| protected ContextLoader |
Create the ContextLoader to use. |
| void |
Close the root web application context. |
| ContextLoader |
Return the ContextLoader used by this servlet. |
| String |
No description provided. |
| void |
Initialize the root web application context. |
| void |
This should never even be called since no mapping to this servlet should ever be created in web.xml. |
| Methods inherited from javax.servletGenericServlet |
|---|
| Methods inherited from java.langObject |
|---|
| Methods inherited from javax.servletServlet |
|---|
| Methods inherited from javax.servletServletConfig |
|---|
public
void
destroy
(
)