// Redirect to Hdiv errors page
try {
String contextPath = context.getExternalContext().getRequestContextPath();
context.getExternalContext().redirect(contextPath + this.config.getErrorPage());
} catch (IOException e) {
throw new StateValidationException();
}
} else {
// Previous strategy doesn't work with immediate components because
// the execution of business logic continues running-
// An exception is thrown to be catched by the ExceptionHandler
// (JSF2)
throw new StateValidationException();
}
}