I have a seam login page backed by the following config in pages.xml:
<page view-id="/login.xhtml" action="#{authenticator.checkLoginAttempts}">
<rewrite pattern="/login"/>
<navigation from-action="#{authenticator.checkLoginAttempts}">
<rule if="#{identity.loggedIn}">
<redirect view-id="/restricted/desktop.xhtml" />
</rule>
</navigation>
</page>When identity.loggedIn the authenticator.checkLoginAttempts does nothing.
The login works fine, the redirection after login works, but somehow the session scoped data is erased, after entering the second tab. Then I get an @In attribute requires non-null value
exceptions for the data suposed to be in the session. In both tabs. No new session seems to open.
Why this behaviour?
The following config works fine:
<page view-id="/login.xhtml" action="*">
<rewrite pattern="/login"/>
<navigation from-action="*">
<rule if="#{identity.loggedIn}">
<redirect view-id="/restricted/desktop.xhtml" />
</rule>
</navigation>
</page>