Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1747

Provide a mechanism for a predicate in return a servlet error page

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.2.0.Final
    • 2.1.3.Final
    • Predicate Language
    • None

      Using the predicate language in Undertow, there is no way to return the error pages configured in the servlet from the handler chain that runs first in the XNIO worker thread.  For example, if the response-code() handler is used, the exchange is simply ended and no response body is sent which is not a very useful behavior.

      A solution provided by Stuart on the mailing list was to set the response code but not end the exchange.  Then configure the servlet handler to check for a status code above 399 and call the servlet sendError() routine.  

            flaviarnn Flavia Rainone
            bdw429s Brad Wood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: