title: How to redirect to Logon page in session timeout in Tomcat 7 using JSF 2, Primefaces and Spring Security
body: <p>When session time outs and the client does an Ajax partial rendering, Spring Security redirects to logOn page but the redirect is catched by the HttpXMLRequest and nothing happens, as expected but not desired.</p>
  
  <p>Spring config:</p>
  
  <pre><code>&lt;sec:session-management invalid-session-url="/page/start.jsf"&gt;
      &lt;sec:concurrency-control max-sessions="1" error-if-maximum-exceeded="true"/&gt;
  &lt;/sec:session-management&gt;
  </code></pre>
  
  <p>Firebug shows Ajax comunication:
  <img src="https://i.stack.imgur.com/Xfalg.jpg" alt="enter image description here"></p>