title: session expiration real time remaining time
body: <p>In a JSF 2.0 context, <code>session.getMaxInactiveInterval()</code> returns the session expiration remnant time, a static way.
  Is there any workaround allowing one to display the remaining time in realtime?
  Something like a system thread.</p>
  
  <p>In my Web app, I am using a primeFaces component (a modal dialog) that shows itself after a certain time of user inactivity (tmeout) displaying a message "Are you there?".
  Actually, what I want is  to add something like the following to that dialog:</p>
  
  <pre><code>&lt;h:outputText id="remainder" value="#{sessionEar.maxInactiveInterval}" &gt;
  &lt;f:ajax execute="@form" render="remainder"  event="????"/&gt;
  &lt;/h:outputText&gt;
  </code></pre>
  
  <p>So the idea is to re-render the <code>&lt;h:outputText /&gt;</code> each 5 seconds or each 60 seconds (1 minute : supposing showing the seconds in real time is not that easy)! So that it updates the remnant time before session expires.</p>
  
  <p>How can I do this? Otherwise, do you have any better solution?</p>