What can be cause of not working redirection in this case?
@HandlesExceptions
public class ExceptionHandler {
public void handleException(@Handles CaughtException<Throwable> e,
Messages messages
FacesContext facesContext){
messages.error("something went wrong");
facesContext.getApplication().getNavigationHandler()
.handleNavigation(facesContext, null, "foopage");
}
}
I'm sure that exception handler method is processed. How can I redirect to some error page in exception handler method?
after calling "handleNavigation", you should call : facescontext.renderResponse();