Exception thrown in @PostConstruct causes IllegalStateException in JSF 2.1
问题 I have an init method on my @ViewScoped mananged bean. In the post construct i load data from the db. I have a custom ExceptionHandlerWrapper to catch all excptions and send to an error pages. However when @PostConstuct throws an exception i recieve an IllegalStateException and am not redirected to the error page. I have tried many combinations..... Ive tried this inside my ExcpetionHandler externalContext.getRequestMap().put(ERROR_BEAN_ID, ERROR_TEXT); externalContext.dispatch(ERROR_PAGE);