Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 64770 invoked from network); 5 Nov 2007 17:09:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Nov 2007 17:09:25 -0000 Received: (qmail 40650 invoked by uid 500); 5 Nov 2007 17:09:02 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 40098 invoked by uid 500); 5 Nov 2007 17:09:00 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 40059 invoked by uid 99); 5 Nov 2007 17:09:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 09:09:00 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of p@pidster.com designates 87.106.82.221 as permitted sender) Received: from [87.106.82.221] (HELO s15243851.onlinehome-server.info) (87.106.82.221) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 17:09:30 +0000 Received: (qmail 28487 invoked from network); 5 Nov 2007 17:08:28 +0000 Received: from host86-145-176-130.range86-145.btcentralplus.com (HELO ?192.168.178.64?) (86.145.176.130) by s15243851.onlinehome-server.info with SMTP; 5 Nov 2007 17:08:28 +0000 Message-ID: <472F4E09.1010505@pidster.com> Date: Mon, 05 Nov 2007 17:08:25 +0000 From: Pid Reply-To: p@pidster.com Organization: Pid Inc User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: running! a servlet at tomcat startup References: <290979.9725.qm@web33808.mail.mud.yahoo.com> In-Reply-To: <290979.9725.qm@web33808.mail.mud.yahoo.com> X-Enigmail-Version: 0.95.5 OpenPGP: id=0927AE57 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Wade Chandler wrote: > Yes, and in the listener I would then utilize some kind of other web client to actually perform a first request. You can use something like HttpClient or one of the command line text browsers and Runtime.exec. It would probably be easier than trying to simulate with some other means, but I may be wrong..especially if you already know what you are doing will work without having to have the extra client connection, but it would seem a lot less code to just have a config file you fill in and a client which makes a simple http web request. I hope the populating of the cache is done programmatically, rather than by making connections, because AFAIK the Context won't start serving pages until it's finished starting up. You could have a race condition if you're using a listener or a servlet init() method, if your populating starts before the pages are available. p > ----- Original Message ---- > From: "Caldarale, Charles R" > To: Tomcat Users List > Sent: Monday, November 5, 2007 10:39:47 AM > Subject: RE: running! a servlet at tomcat startup > > >> From: loredana loredana [mailto:loredana888888@yahoo.com] >> Subject: Re: running! a servlet at tomcat startup >> >> In case ur wondering why I used a servlet to fill >> the cache is because I need some variables like >> request.getContenxtPath, getRealPath() etc. > > Wouldn't a ServletContextListener be more appropriate for this kind of > activity? See section 10 of the servlet spec for details. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE > PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > > > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org