title: Automatically perform action in client side when the session expires
body: <p>I want to display in a <code>&lt;p:growl&gt;</code> that the session has expired.</p>
  <p>I found many methods to handle session expiration like:</p>
  <ul>
  <li><a href="https://stackoverflow.com/questions/11203195/session-timeout-and-viewexpiredexception-handling-on-jsf-primefaces-ajax-request">Session timeout and ViewExpiredException handling on JSF/PrimeFaces ajax request</a></li>
  </ul>
  <p>But I couldn't push a faces message to <code>&lt;p:growl&gt;</code>.</p>
  <p>To the point, how can I automatically run some (JavaScript) code in client side when the HTTP session has automatically expired in server side?</p>