title: Spring-MVC: What are a "context" and "namespace"?
body: <p>From <a href="http://javasourcecode.org/html/open-source/spring/spring-3.0.4/org/springframework/web/context/support/XmlWebApplicationContext.html">XmlWebApplicationContext</a> javadoc:</p>
  
  <blockquote>
    <p>By default, the configuration will be taken from "/WEB-INF/applicationContext.xml" for the root context, and "/WEB-INF/test-servlet.xml" for a context with the namespace "test-servlet" (like for a DispatcherServlet instance with the servlet-name "test").</p>
  </blockquote>
  
  <p>What does it mean a Spring context?</p>
  
  <p>What is the root context? What other kinds of Spring context are there?</p>
  
  <p>What is a namespace?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Some follow-up questions:</p>
  
  <ol>
  <li><p>What is a Spring ApplicationContext - is it some "thing" that holds the beans that are defined in a configuration XML file?</p></li>
  <li><p>Looking at the code of ContextLoaderListener, it looks like it loads the data defined in the config XML file(s). But my Spring web app works without defining this listener or any other listener. How could it be?</p></li>
  <li><p>In what scenarios would it make sense to have more than one instance of Spring's DispatcherServlet?</p></li>
  <li><p>Is the root context (data from applicationContext.xml) applicable to every instance of DispatcherServlet, while other contexts (e.g. data from test-servlet.xml) applicable only to the relevant DispatcherServlet (i.e. test)?</p></li>
  </ol>