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

Lizhg,

lizhg wrote:
> Hi all, I have some problem with Listener and load-on-startup, I search
> on google and I find this article below, it do a lot good to me, but I
> still want to ask , using the init() [and destroy()] of a servlet 
> [is the same as] using the
> contexInitialized() and the contextDestroyed() of a listener?

It is generally considered good form to set up application-wide
configuration, objects, etc. in a Listener. For this type of use, you
want to use a ServletContextListener specifically (there are other types
of listeners).

If you have a servlet that needs to configure /itself/, then it's
perfectly reasonable to use the servlet's init() method for that purpose.

- -chris

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

iD8DBQFGLfI09CaO5/Lv0PARAqjuAJ0WX1EaGVf6mun6az6cR6/caXe0twCgqCgh
V+Z8d9ig1R2HHbrvy7KfrNU=
=zeEl
-----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