Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>load-on-startup tells the servlet container to load the specified resource at server startup. The number that you see tells the order of startup if there are more than one load-on-startup tag.</p> <pre><code>&lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;load-on-startup&gt;2&lt;/load-on-startup&gt; </code></pre> <p>will cause the resource with load on startup 1 to be loaded first. This is to control the sequence of loading if there is a dependency. Look at the servlet specification that explains the load sequence.</p> <p>The answer I referred to in my comment below (Ref <a href="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" rel="noreferrer">http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd</a>):</p> <pre><code> &lt;xsd:element name="load-on-startup" type="javaee:load-on-startupType" minOccurs="0"&gt; &lt;xsd:annotation&gt; &lt;xsd:documentation&gt; The load-on-startup element indicates that this servlet should be loaded (instantiated and have its init() called) on the startup of the web application. The optional contents of these element must be an integer indicating the order in which the servlet should be loaded. If the value is a negative integer, or the element is not present, the container is free to load the servlet whenever it chooses. If the value is a positive integer or 0, the container must load and initialize the servlet as the application is deployed. The container must guarantee that servlets marked with lower integers are loaded before servlets marked with higher integers. The container may choose the order of loading of servlets with the same load-on-start-up value. &lt;/xsd:documentation&gt; &lt;/xsd:annotation&gt; &lt;/xsd:element&gt; </code></pre> <p>Read the documentation carefully.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload