title: Essential difference between Servlet context and Spring application context
body: <p>I'm reading the spring framework documentation and now I'm at <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-factory-scopes-application" rel="nofollow noreferrer">application scope concept</a>. What the documentation says about that concept is this:</p>
  
  <blockquote>
    <p>This is somewhat similar to a Spring singleton bean but differs in two
    important ways: It is a singleton per ServletContext, not per Spring
    ApplicationContext</p>
  </blockquote>
  
  <p>To me, what's unclear is how can we imagine the relationship between Spring application context and Servlet context.</p>
  
  <p>I'd assume that there two possible cases for the relationship between them:</p>
  
  <p><strong><em>I</em></strong></p>
  
  <p><img src="https://i.stack.imgur.com/3hW9e.jpg" alt="enter image description here"></p>
  
  <p><strong><em>II</em></strong></p>
  
  <p><img src="https://i.stack.imgur.com/vCi9e.jpg" alt="enter image description here"></p>
  
  <p>So, how does the Spring application context relate with Servlet context? Is it case <strong><em>I</em></strong> or case <strong><em>II</em></strong> or neither of them?</p>