Search code examples
javajavascriptjqueryjsf-2

Display a timeout window 30 seconds before the session timeout in jsf 2.0


The requirement is to display a timeout window 30 seconds before the session timeouts. If the user state is still inactive then we need to redirect to the home page. The max inactive internal is already known.How can I achieve this in jsf 2.0.


Solution

  • Primefaces has p:idleMonitor for this purpose.

    IdleMonitor can also invoke server side events with ajax in case user goes idle. IdleListeners are suitable for invalidating user session.