Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 56740 invoked from network); 9 Sep 2002 08:50:35 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Sep 2002 08:50:35 -0000 Received: (qmail 14028 invoked by uid 97); 9 Sep 2002 08:51:00 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 14013 invoked by uid 97); 9 Sep 2002 08:50:59 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 14001 invoked by uid 98); 9 Sep 2002 08:50:59 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <033201c257de$0db8db50$0a14a8c0@terre> From: "Chris Brown" To: "Tomcat Users List" References: Subject: Re: global.jsa Date: Mon, 9 Sep 2002 10:51:14 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello, I've seen a few answers to your question suggesting that you use a servlet that loads on startup. I have another suggestion that you may prefer to emulate "global.asa": implement ServletContextListener and HttpSessionActivationListener. javax.servlet.ServletContextListener ...sends you events when the webapp starts and ends. javax.servlet.http.HttpSessionActivationListener ...sends you events when a session is created or destroyed. You'll find javadocs for these items in the following path with a default tomcat installation, obviously relative to the root of your installation: /tomcat-docs/servletapi/index.html To use them, you'll need to add appropriate XML elements to web.xml (refer to a tutorial or the web.xml DTD). It's simple and works well. - Chris ----- Original Message ----- From: "neal" To: "Tomcat Users List" Sent: Tuesday, September 03, 2002 10:14 AM Subject: global.jsa > Is there such a thing as a global.jsa file in Tomcat? > > I first saw this concept (an idea taken from ASP's global.asa) implemented > in JRUN. > > If there is a global.jsa, does anyone know of any docs on this? If not, is > there an alternative? The reason I would want to use this is to instantiate, > populate, and cache a few objects upon startup of the application. If > Tomcat does not provide a global.jsa...does anyone know how otherwise to > achieve the goal? > > Thanks. > Neal > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > > -- To unsubscribe, e-mail: For additional commands, e-mail: