0
<web-app ...>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/court-service.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
...
</web-app>

Note that ContextLoaderListener loads the specified bean configuration files into the root application context, while each DispatcherServlet instance loads its configuration file into its own application context and refers to the root application context as its parent. So, the context loaded by each DispatcherServlet instance can access and even override beans declared in the root application context (but not vice versa). However, the contexts loaded by the DispatcherServlet instances cannot access each other.

The content above is from the book "Spring Recepies" by Gary Mak, Josh Long, and Daniel Rubio. Please explain the application context loader thing in classes and object Language

Sunny Gupta
  • 6,609
  • 15
  • 50
  • 80
  • Do you need information about root and Dispatherservlet's own application context? – Sunny Gupta Jan 22 '12 at 11:35
  • @SunnyGupta You got my point..I want a deeper understanding about these application context. I want the explaination in object and classes language – Sunny Gupta Jan 22 '12 at 11:37
  • 1
    you can refer this link: http://stackoverflow.com/questions/5132604/why-use-spring-applicationcontext-hierarchies – Sunny Gupta Jan 22 '12 at 11:45

0 Answers0