I am developing a site with Seam 3 and JBoss 7. I'm using Seam security and JSF. The front page of the site has the login controls. When the user enters his credentials he is redirected to his user page "/MySC".
But if the logged-in user just types the domain root "/" he gets to the front page. What I want is that when the user is logged-in, he should not be able to access the front page again. If he requests to go to the front page or enter the domain root in the location bar, I want him to be redirected to "/MySC". How can I do that?
You can use SEAM navigation rule which is quite powerful.. You declare it in page.xml... You can declare conditional navigation rule there..
<page view id="/view.xhtml">
<navigation from-action="#{user.login}">
<rule if-outcome="successfull"><redirect view-id="/MySC.xhtml"/>
<message severity="Info">
Your login is successfull!.
</message>
</navigation>
</page>