I have many managed beans in @SessionScoped
and I want to clear the whole session when a user logs out. Does anyone know how to achieve this? And which is the best performing: @SessionScoped
or @RequestScoped
or @ViewScoped
? Also is there annotation to replace the redirects in file faces-config.xml?
Can I replace the following by annotation:
<navigation-rule>
<from-view-id>pages/login.xhtml</from-view-id>
<navigation-case>
<from-outcome>userOK</from-outcome>
<to-view-id>pages/template.xhtml</to-view-id>
<redirect />
</navigation-case>
<navigation-case>
<from-outcome>userNOK</from-outcome>
<to-view-id>pages/login.xhtml</to-view-id>
</navigation-case>
</navigation-rule>