Uncaught Exception Handling in JSF
I am trying to create a filter to handle exceptions (see Handling Uncaught Exception in JSF ) public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { try { log.info("check filter is running"); chain.doFilter(request, response); } catch (Exception e) { log.error("Uncaught exception",e); request.setAttribute("exception", e); request.getRequestDispatcher("/error.xhtml").forward(request, response); } } I execute the following method: <p:commandButton value="Dispatch Order" update="@form" action="#{orderBean.dispatchOrder()}">