Remove outdated references to ContextLoaderServlet
Issue: SPR-7725
This commit is contained in:
@@ -563,20 +563,6 @@ argument.required=Ebagum lad, the '{0}' argument is required, I say, required.</
|
||||
programmatically by using one of the
|
||||
<interfacename>ApplicationContext</interfacename> implementations.</para>
|
||||
|
||||
<para>The <classname>ContextLoader</classname> mechanism comes in two
|
||||
flavors: the <classname>ContextLoaderListener</classname> and the
|
||||
<classname>ContextLoaderServlet</classname>. They have the same
|
||||
functionality but differ in that the listener version is not reliable in
|
||||
Servlet 2.3 containers. In the Servlet 2.4 specification, Servlet context
|
||||
listeners must execute immediately after the Servlet context for the web
|
||||
application is created and is available to service the first request (and
|
||||
also when the Servlet context is about to be shut down). As such a Servlet
|
||||
context listener is an ideal place to initialize the Spring
|
||||
<interfacename>ApplicationContext</interfacename>. All things being equal,
|
||||
you should probably prefer <classname>ContextLoaderListener</classname>;
|
||||
for more information on compatibility, have a look at the Javadoc for the
|
||||
<classname>ContextLoaderServlet</classname>.</para>
|
||||
|
||||
<para>You can register an <interfacename>ApplicationContext</interfacename>
|
||||
using the <classname>ContextLoaderListener</classname> as follows:</para>
|
||||
|
||||
@@ -587,15 +573,7 @@ argument.required=Ebagum lad, the '{0}' argument is required, I say, required.</
|
||||
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<lineannotation><!-- or use the ContextLoaderServlet instead of the above listener</lineannotation><emphasis>
|
||||
<servlet>
|
||||
<servlet-name>context</servlet-name>
|
||||
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
--</emphasis>></programlisting>
|
||||
</listener></programlisting>
|
||||
|
||||
<para>The listener inspects the <literal>contextConfigLocation</literal>
|
||||
parameter. If the parameter does not exist, the listener uses
|
||||
@@ -608,11 +586,6 @@ argument.required=Ebagum lad, the '{0}' argument is required, I say, required.</
|
||||
with "Context.xml", residing in the "WEB-INF" directory, and
|
||||
<literal>/WEB-INF/**/*Context.xml</literal>, for all such files in any
|
||||
subdirectory of "WEB-INF".</para>
|
||||
|
||||
<para>You can use <classname>ContextLoaderServlet</classname> instead of
|
||||
<classname>ContextLoaderListener</classname>. The Servlet uses the
|
||||
<literal>contextConfigLocation</literal> parameter just as the listener
|
||||
does.</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="context-deploy-rar">
|
||||
|
||||
Reference in New Issue
Block a user