title: JSF 2 and Spring 3 integration
body: <p>In our JSF 2, spring 3 web application we have the following sets of entries in the web.xml to integrate spring and JSF</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;/WEB-INF/config/spring/applicationContext.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <p>And it works!</p>
  
  <p>However, after going through quiet a few JSF &amp; spring tutorials I see the need to define a <strong>RequestContextListener</strong> in addition to the <strong>ContextLoaderListener</strong>.</p>
  
  <p>We have both request scope and session scope beans in our application.</p>
  
  <p>Are both listeners mandatory? What is the consequence of not defining the <strong>RequestContextListener</strong>?</p>