I think ServletContextListeners get notified AFTER init() is called.. at
least it seems like so from the API:

 void contextInitialized(ServletContextEvent sce)
          Notification that the web application is ready to process
requests.

therefore, by the time that contextInitialized is called.. a user may
already be in the web app. So if ur going to do code like set up db
connections or something.. it might be too late.
-Tim

-----Original Message-----
From: syed huda [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 12:09 PM
To: [EMAIL PROTECTED]
Subject: ServletContextListener vs init()


What are advantages of using ServletContextListener above init()? Don't they
do the same thing?
Regards,

Syed

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to