Hello, I wanna know if there is a function that is called directly after the deployment of the server. This functions could be called as an initialisation function of the deployment. Thanks
+2
A:
If this is for a single app, you can implement a ServletContextListener
, listening on the contextInitialized()
event. You can register an implementation through the <listener>
tag in your web.xml.
wds
2010-08-30 13:19:26
thanks for your answer
ld493
2010-08-30 14:12:41
This will happen every time a new instance of your app is started, not just once per deployment.
Nick Johnson
2010-08-30 18:09:14
@NickJohnson I didn't think of that. Depending on what he wants to accomplish it's probably still fine though, since I can't see the use case for this on a per-global-deployment basis.
wds
2010-08-31 09:57:53