It appears that the tag <load-on-startup> is ignored when the server starts.
However, it does seem to load the servlets based on the order of the
<servlet> tags.

Place this code in your servlets to see a time value:

public void init(ServletConfig sconf) throws ServletException
{
  super.init(sconf);
  System.out.println("DateServlet.init loading:  "+ new Date().getTime());
}

This is how I've got the tags specified in the
/orion/default-web-app/WEB-INF/web.xml file:

        <servlet>
                <servlet-name>date</servlet-name>
                <servlet-class>DateServlet</servlet-class>
                <load-on-startup>20</load-on-startup>
        </servlet>

        <servlet>
                <servlet-name>snoop</servlet-name>
                <servlet-class>SnoopServlet</servlet-class>
                <load-on-startup>10</load-on-startup>
        </servlet>

On my system the DateServet always loads first.

========================================
Mike Fontenot - Object Systems Architect
Polygon Network, Inc.
Golden, Colorado
========================================

Reply via email to