This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
maybe I didn't explain correctly before, Actually in our enterprise we work only with struts, and in our web projects configuration we have a servlet that loads on init() , in this servlet we have all parameters with Db connection and others, and then this paramaters are passed with propertyes.
with this configuration we get a log that writtes:
conecction database correct.....
so, I would like to log something similar when application starts.
If you want to have something to do when application starts ,then init() place is the only place where you can do it.Apart from that you need to mention <load-on-startup>0</load-start-up> for that servlet in your web.xml.This will lazily load the servlet on application start up and not when it receives its first request.