You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
https://github.com/undertow-io/undertow/blob/master/servlet/src/main/java/io/undertow/servlet/core/ErrorPages.java
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.The text was updated successfully, but these errors were encountered: