Application startup + shutdown global methods

Hi all.

What I want to do is have a global method which runs when the application starts up and one that runs when the application shuts down.

I presumed the ApplicationBean1 constructor fulfilled the application-wide startup but it does not run at startup.

What I also tried doing is making a new Servlet class and adding my code to its init() method. I then added the servlet to the xml file with the load-on-startup parameter as '1'. The servlet did not run at startup.

Can anyone help? Surely to goodness there is a global 'start' method somewhere, I mean what do you do if you need startup code but don't know which .jsp will be hit first?

Thanks

John

[711 byte] By [jms137] at [2007-11-25 18:07:12]
# 1

What you presumed ApplicationBean1 constructor fullfiled tha application wiide startup is correct . Actuallly there are

three scopes the request , session , application .

What you could do is go this Creator tutorial and read the

Sharing Data cpt , it would help you to understand the scope of the objects much better.

kno2250g at 2007-7-3 17:47:03 > top of Java-index,Development Tools,Java Tools...