This content has been marked as final.
Show 4 replies
-
1. Re: Redirect to home page if session active
gjeudy Sep 16, 2008 5:00 PM (in response to sanghakanwar)why not have home page as main entry and redirect to login page if user is not logged?
-
2. Re: Redirect to home page if session active
damianharvey.damianharvey.gmail.com Sep 16, 2008 5:29 PM (in response to sanghakanwar)Or have a yourLoginPage.page.xml with an entry like this:
<?xml version="1.0" encoding="UTF-8"?> <page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd" action="#{authenticator.checkLogin}"> <navigation from-action="#{authenticator.checkLogin}"> <rule if="#{identity.loggedIn}"> <redirect view-id="/secure/home.xhtml"/> </rule> </navigation> </page>
Where checkLogin is just an empty dummy method returning a String.
Cheers,
Damian.
-
3. Re: Redirect to home page if session active
sanghakanwar Sep 16, 2008 7:33 PM (in response to sanghakanwar)Thanks Damian ! Worked like a charm :) !
-
4. Re: Redirect to home page if session active
sanghakanwar Nov 24, 2008 1:21 PM (in response to sanghakanwar)Hi Damian,
This stopped working in 2.1.0 GA version of seam. The authenticator.checkLogin
is never called when i do a back on the browser after logging in.Thanks,
Kanwar