Announcement Announcement Module
No announcement yet.
ServletContextListener vs Bean loading at runtime. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ServletContextListener vs Bean loading at runtime.

    Well still trying to bring my knowledge of the Spring 'web' portion (MVC) up to speed and part of this is learing how to do things I take for granted in other frameworks.

    That being said:

    Syould I still be using ServletContextListers to do some work once my Context is loaded

    Or can I just rely on the bean loading snd implementing the org.springframework.beans.factory.InitializingBean and doing my start up work then?

  • #2
    Hello JeanNiBee,
    A ServletContextListener all it gives you is a reference to the app context object, but if you are to run SpringMVC, any beans loaded by it's config that implements org.springframework.web.context.ServletContextAwar e will give you the same reference object, but you gain all the Spring features when configuring and setup the application all in one place.



    • #3
      Ah right this goes back to part of the discussion we were having on the thread about "application context".