Thanks for the reply Stuart. I've tried this with no success, but perhaps I'm doing it wrong.
List<PredicatedHandler> ph = PredicatedHandlersParser.parse(predicatesLines, _classLoader);
servletBuilder.addOuterHandlerChainWrapper(next -> Handlers.predicates(ph,next));
When the response-code handler fires, I still get no response body.
On a related note, when I move the predicates into an outer handler chain wrapper, my default response listener also doesn't fire at all.
On an unrelated train of thought, I've been trying to see if I can get the default response listener to automatically dispatch the correct error page, but that hasn't been going well either. If I don't use the outer handler chain idea, but try to capture the empty response in a default response listener, I can return a static message using the Sender class
Sender sender = exchange.getResponseSender();
sender.send(errorHTMLString);
But if I try to run something this in my default response listener to invoke my error pages
ServletRequestContext src = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);
HttpServletResponseImpl response = src.getOriginalResponse();
response.doErrorDispatch( exchange.getStatusCode(), exchange.getReasonPhrase() );
Then it's as though nothing happens and I still get an empty response.
Thanks!
~Brad
Developer Advocate
Ortus Solutions, Corp