-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

nam3l3ss,

nam3l3ss wrote:
| I have a JSP page with an application scope bean included (jsp:useBean).
| This bean uses resources I need to free after the application gets
restarted
| by the manager.
| The problem is, I have no idea how to do this. I've checked the docs,
but I
| must have overlooked it.

See ServletContextListener. You're looking for contextDestroyed(), which
actually runs /before/ the context is destroyed in spite of its name.

You should be able to get any objects from the ServletContext
("application") and clean them up at that point.

| I suspected that the container might call some kinda destroy method, so I
| tried all the usual ones, without result.

Like what?

| Do I have to explicitly remove it from the servlet context, or do I
need to
| write some method that the container can call?

You write a class that implements ServletContextListener and configure
it as a <listener> in web.xml.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgQuJEACgkQ9CaO5/Lv0PCryQCfbRz84APv+LHzGHzbJUCbDGB0
deoAn05v/+To9WQ0Hm7IZ5TV2skfgRQh
=FhAP
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to