New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error page lookup does not conform to the servlet spec #156

VsevolodGolovanov opened this Issue Aug 5, 2015 · 1 comment


None yet
2 participants

VsevolodGolovanov commented Aug 5, 2015

WebXml#findErrorPageLocation is incorrect, because it doesn't satisfy the rule of the servlet spec: The closest match in the class hierarchy wins. WebXml uses the first encountered superclass instead.
Here is how Undertow does it:

String location = null;
for (Class c = exception.getClass(); c != null && location == null; c = c.getSuperclass()) {
    location = exceptionMappings.get(c);

WebXml also doesn't do the unwrap the ServletException and do a second pass step, but I guess this is intentional, because WebXml#findErrorPageLocation is intended to be called inside the Servlet#service execution, before ServletException wrapping could occur.

@BalusC BalusC closed this in 89b677d Aug 5, 2015


This comment has been minimized.

Show comment
Hide comment

BalusC Aug 5, 2015


Fix is available in today's snapshot. Thank you for reporting!


BalusC commented Aug 5, 2015

Fix is available in today's snapshot. Thank you for reporting!

@BalusC BalusC added the bug label Oct 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment