tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Getting a reference to the app events listener.
Date Wed, 03 Oct 2001 16:30:23 GMT


On Wed, 3 Oct 2001, Manu KY wrote:

> Date: Wed, 03 Oct 2001 08:54:26 +0530
> From: Manu KY <manu_kry@yahoo.com>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: Getting a reference to the app events listener.
>
> Hello all,
> how should i get a reference to an application event listener instance
> created by the container?
>

You can't.

> i tried using jsp:useBean and scoping the instance at application
> level,  but the action tag created a new instance.
>

If you need to communicate between a listener and the rest of the
application, you should store objects as servlet context attributes under
agreed-upon names.  There's no reason to reference the listener instance
itself.  (By the same reasoning, there is no way to get a reference to a
servlet or filter instance, either.)

> Manu
>

Craig McClanahan


Mime
View raw message