I have a p:commandButton on a page. When the session times out and I click on it nothing happens. Nothing appears on the logs and the action is not called.
I have read this post and this post about the subject. So I've created an ExceptionHandler with the following code:
Throwable exc = null;
for (final Iterator<ExceptionQueuedEvent> it = getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();) {
exc = it.next().getContext().getException();
}
return exc;
in order to get the exception and redirect the user to an error page. However, the iterator is always empty, so excis always null...