I tried to use the NavigationHandler inside a Faces exception handler to deal with ViewExpiredException as mentioned here: http://www.nfjsone.com/blog/ed_burns/2009/09/dealing_gracefully_with_viewexpiredexception_in_jsf2.
The example does not work with myfaces, because org.apache.myfaces.application.NavigationHandlerImpl throws a NullpointerException while handleNavigation() is called.
The exception occurs in line 160: String viewId = facesContext.getViewRoot().getViewId();
I think the cause is that the viewroot is not set anymore when the ViewExpiredException is thrown.
The official API for NavigationHandler.handleNavigation tells, that the NullpointerException is thrown only if the given facescontext is null.
NullPointerException - if context is null