Re: Method or function to be executed on tomcat startup

2008-07-19 Thread Yves Glodt
On Friday 18 July 2008, Mikolaj Rydzewski wrote: > Edoardo Panfili wrote: > > "xx.ServerInit" is a regular servlet the code is in > > init(ServletConfig config) method > > Use of ServletContextListener is preferred. That worked very well, thanks for the hint. Helpful article: http://www.stardevel

Re: Method or function to be executed on tomcat startup

2008-07-18 Thread Mikolaj Rydzewski
Edoardo Panfili wrote: "xx.ServerInit" is a regular servlet the code is in init(ServletConfig config) method Use of ServletContextListener is preferred. To OP: put properties Map in ServletContext and it will be accessible for both servlets and JSPs (which are the servlets anyway). -- Mikola

Re: Method or function to be executed on tomcat startup

2008-07-18 Thread Edoardo Panfili
Yves Glodt ha scritto: Hello, this is probably a FAQ, but I failed to find ti anyway... Where can I declare a static method that I want to be executed on tomcat or webapp startup? I use this in web.xml Env init ServiziServerInit xx.ServerInit 1 ServiziServerInit /SI "xx.Serv

Method or function to be executed on tomcat startup

2008-07-18 Thread Yves Glodt
Hello, this is probably a FAQ, but I failed to find ti anyway... Where can I declare a static method that I want to be executed on tomcat or webapp startup? I have a properties file which I would like to read into a Map on startup, and have this Map available throughout my servlets and jsps.