tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Brown" <bro...@reflexe.fr>
Subject Re: global.jsa
Date Mon, 09 Sep 2002 08:51:14 GMT

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" <nealcabage@yahoo.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
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:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
>
>
>



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message