This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web application start up (With spring)

 
Laxmikant Kumbhare
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello there,

I want a method (or some functionality) to be executed after my web application starts (context loaded). I am using spring 3.0 as framework.

I tried using ServletContextListener which I implemented in my class


my listener class




and part of web.xml is




but its not printing that message.....


Please help me....
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring has such a listener class already called ContextLoaderListener. Try using that. You also might have to set a <context-param> to point to your config files, unless you use the naming convention of applicationContext.xml and put that in the WEB-INF directory.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic