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
Determine if this request is a postback or initial request by executing the following algorithm. Find the render-kit-id for the current request by calling calculateRenderKitId() on the Application’s ViewHandler. Get that RenderKit’s ResponseStateManager and call its isPostback() method, passing the current FacesContext. If the current request is an attempt by the servlet container to display a servlet error page, do not interpret the request as a postback, even if it is indeed a postback.
However neither Servlet nor Faces spec is sufficiently specific as to how exactly to detect that. The current impl only checks for the error message, which is in case of exceptions (status=500) the raw exception message. However, if the exception message itself is null, e.g. throw new RuntimeException() instead of throw new RuntimeException("peek-a-boo"), this check fails.
The text was updated successfully, but these errors were encountered:
BalusC
changed the title
isErrorPage() check fails in Tomcat when thrown exception has no message
isErrorPage() check fails in Tomcat when thrown exception has null message
Nov 14, 2024
omnifaces/omnifaces#865
Unsure about other servers.
Solution: check exception itself as well.
Spec: https://jakarta.ee/specifications/faces/4.0/jakarta-faces-4.0#a404
However neither Servlet nor Faces spec is sufficiently specific as to how exactly to detect that. The current impl only checks for the error message, which is in case of exceptions (status=500) the raw exception message. However, if the exception message itself is null, e.g.
throw new RuntimeException()
instead ofthrow new RuntimeException("peek-a-boo")
, this check fails.The text was updated successfully, but these errors were encountered: