title: Load application context without using web.xml
body: <p>I was wondering if there's a way to Load Springs application context without having to define it in a <em>web.xml</em>.</p>
  
  <p>I see you can use:</p>
  
  <pre><code>ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
  </code></pre>
  
  <p>But if you wanted to use a bean you've got to <strong>getBean()</strong> to have access to it. I am thinking possibly there could be a way to load the context programmatically as would the definition in web xml, without having to call getBean.</p>
  
  <p>Any ideas?</p>