title: Loading Spring Context Dynamically at Run-time in a Web Application
body: <p>I'm converting a standard Java Application that uses Spring Framework into a Web App. This application loads new Spring Context based on run-time parameters, that was done using <code>ClassPathXmlApplicationContext/FileSystemXmlApplicationContext</code>. </p>
  
  <p>So my question is how to do the same in a Web Application given that I already configured my web.xml and added Spring Listeners as below:</p>
  
  <pre><code>&lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <p>Another Problem, my deployment environment is on Tomcat 5.5 where I'm not able to see any logging during spring context loading to know what's wrong.</p>