Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
    Bookmark Topic Watch Topic
  • New Topic

Is there any way to initialize a class during deployment?

 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Report post to moderator
Is there any way to initialize a class during deployment?

I need to run a process during deployment only so that user intervene not require, when i restart server or so. This is my requirement.

Do you have any procedure to solve it please?



 
Mike Zal
Ranch Hand
Posts: 144
Fedora Java Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
You can use a ServletContextListener to perform some action when the web app starts or stops. Example Put your initialization code in the contextInitialized method and it will run when the application is started.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
 
    Bookmark Topic Watch Topic
  • New Topic