Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing intialisation values to an application  RSS feed

 
KOla Oyedeji
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are initialisation paramters loaded when they are referenced or earlier? I have some values passed to my application using the context-param element in my web.xml. Are these parameters read from the web.xml every time they are needed or are are they read once and then cached?
Also is there anywhere where some code can be executed the first time an application is started to initialise the application?
thanks
 
Dominic Paquette
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think the <context-param> get read when the application starts
To get notified of initialization you can use javax.servlet.ServletContextListener

Hope this helps
Dominic
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!