title: How to limit to store the no of views in session for prime faces application
body: <p>We are using primefaces 2.2.1 version in our application. We would like to restrict to store the no of views storing in session to 3. I have configured my web.xml like as :</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;description&gt;State saving method: 'client' or 'server' (=default).See JSF  Specification 2.5.2&lt;/description&gt;
      &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
      &lt;param-value&gt;server&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;description&gt;The maximum number of logical views (GET requests) to store per session (http://tinyurl.com/yw6f2e)&lt;/description&gt;
      &lt;param-name&gt;com.sun.faces.numberOfLogicalViews&lt;/param-name&gt;
      &lt;param-value&gt;3&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;description&gt;The maximum number of JSF views (POST requests) stored in the session for per logical view (http://tinyurl.com/yw6f2e)&lt;/description&gt;
      &lt;param-name&gt;com.sun.faces.numberOfViewsInSession&lt;/param-name&gt;
      &lt;param-value&gt;3&lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre>
  
  <p>It seems that , this configuration is not working. I have found 15 views storing  in session, when i look at the memory heap dumps.</p>
  
  <p>Using Primefaces 2.2.1, JSF 2.0.9 running on Mojarra 2.0.9</p>
  
  <p>Any ideas...</p>