Class FullAjaxExceptionHandler

    • Constructor Detail

      • FullAjaxExceptionHandler

        public FullAjaxExceptionHandler(ExceptionHandler wrapped)
        Construct a new ajax exception handler around the given wrapped exception handler.
        wrapped - The wrapped exception handler.
    • Method Detail

      • handle

        public void handle()
                    throws FacesException
        Handle the ajax exception as follows, only and only if the current request is an ajax request and there is at least one unhandled exception:
        • If the exception is an instance of FacesException, then unwrap its root cause as long as it is not an instance of FacesException.
        • Find the error page location as per Servlet specification 10.9.2:
          • Make a first pass through all specific exception types. If an exact match is found, use its location.
          • Else make a second pass through all specific exception types in the order as they are declared in web.xml. If the current exception is an instance of it, then use its location.
          • Else use the default error page location, which can be either the HTTP 500 or java.lang.Throwable one.
        • Set the standard servlet error request attributes.
        • Force JSF to render the full error page in its entirety.
        Any remaining unhandled exceptions will be swallowed. Only the first one is relevant.
        handle in class ExceptionHandlerWrapper