2

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?

pseudo
  • 836
  • 1
  • 11
  • 20

1 Answers1

0

after calling "handleNavigation", you should call : facescontext.renderResponse();

baraber
  • 3,296
  • 27
  • 46