tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Louis MONTEIRO <>
Subject Re: Is it possible to load a servlet on the standalone server startup?
Date Wed, 11 Nov 2009 17:10:25 GMT


not sure it's the better mailing list t talk about Servlet.
Never mind, to specify a load order, you can try something like 
    	<servlet-name>Servlet name</servlet-name>
    	<display-name>Display name</display-name>

<load-on-startup>0</load-on-startup> indicates that the servlet won't be
started until a request tries to access it.

If load-on-startup is greater than zero then when the container starts it
will start that servlet in ascending order of the load on startup value you
put there (ie 1 then 2 then 5 then 10 and so on).

IMO, it would be better to use a servlet listener and implement the
contextInitialized method.

Hope it helps.

brownie wrote:
> I need to write JUnit tests for an existing project. There are some
> servlets that should be loaded to initialize some stuff.
> Is it possible to load a servlet on the standalone server startup, e.g.
> using Jetty?
> Thanks in advance.

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message