Description
If I define a error-page that need session for example with jsf:
<error-page>
<error-code>404</error-code>
<location>/jsf/my-notfound.xhtml</location>
</error-page>
Define filters as:
[urls]
/jsf/login.xhtml = authc
/integrations-rest/** = anon, noSessionCreation
/jsf/my-notfound.xhtml = anon
/** = authc
If I try to GET a not found url from /integrations-rest/something it will redirect to /jsf/my-notfound.xhtml but it fails once it can't create a session.
It should clean the request attribute in the afterCompletion method. So after foward it will reaply the filters
request.removeAttribute(DefaultSubjectContext.SESSION_CREATION_ENABLED);