2012-06-12 6 views
2

이 경우 리디렉션이 작동하지 않을 수있는 원인은 무엇입니까?Seam 3 예외 처리기 - 리디렉션이 작동하지 않습니다.

@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"); 
    } 
} 

예외 처리 메소드가 처리됩니다. 예외 처리기 메서드에서 일부 오류 페이지로 리디렉션 할 수 있습니까?

답변

0

"handleNavigation"호출 후 facescontext.renderResponse();를 호출해야합니다.

관련 문제