Return-Path: Delivered-To: apmail-openejb-users-archive@www.apache.org Received: (qmail 40440 invoked from network); 11 Nov 2009 17:10:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Nov 2009 17:10:56 -0000 Received: (qmail 79324 invoked by uid 500); 11 Nov 2009 17:10:56 -0000 Delivered-To: apmail-openejb-users-archive@openejb.apache.org Received: (qmail 79307 invoked by uid 500); 11 Nov 2009 17:10:56 -0000 Mailing-List: contact users-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openejb.apache.org Delivered-To: mailing list users@openejb.apache.org Received: (qmail 79297 invoked by uid 99); 11 Nov 2009 17:10:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 17:10:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 17:10:46 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1N8Gi9-0004g3-L8 for users@openejb.apache.org; Wed, 11 Nov 2009 09:10:25 -0800 Message-ID: <26304910.post@talk.nabble.com> Date: Wed, 11 Nov 2009 09:10:25 -0800 (PST) From: Jean-Louis MONTEIRO To: users@openejb.apache.org Subject: Re: Is it possible to load a servlet on the standalone server startup? In-Reply-To: <26299042.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jean-louis.monteiro@atosorigin.com References: <26299042.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, 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 Display name XXXServlet 0 0 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. Jean-Louis 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: http://old.nabble.com/Is-it-possible-to-load-a-servlet-on-the-standalone-server-startup--tp26299042p26304910.html Sent from the OpenEJB User mailing list archive at Nabble.com.