I'm looking to approximate the error page functionality that the servlet gives me, but in a default response listener. What I like about the servlet error pages is you can point to a file that's process by the servlet itself such as a jsp to have dynamic code responding to a 404, etc.
Looking at Undertow's non-servlet classes, I see there is a SimpleErrorPageHandler, but that just outputs a pre-set generic error page.
Looking further, I see there is a FileErrorPageHandler which is close, but it only serves static files directly, and would not allow the error page to be a jsp or cfm which needs to be processed in the servlet.
If I needed to send an error page early on in the request, I could simply 'rewrite" the relative URL to change where the request pointed, but I'm not sure how to accomplish this at the end of the exchange in a default response listener. Is there a way to dispatch a new request within my default response listener to a new URI of my choosing?