-
1. Re: Redirect after login and logout to the same page
arturfriesen Aug 1, 2011 8:34 AM (in response to kwutzke)Try this in your pages.xml:
<page view-id="*">
<navigation from-action="#{identity.logout}">
<redirect view-id=""/>
</navigation>
</page> -
2. Re: Redirect after login and logout to the same page
kraizzee Apr 5, 2012 12:51 AM (in response to arturfriesen)both the above snippets don't seem to work. Any other solution?
-
3. Re: Redirect after login and logout to the same page
cacelis Apr 11, 2012 12:43 PM (in response to kwutzke)Try writing this:
<event type="org.jboss.seam.security.loginSuccessful">
<action execute="#{redirect.returnToCapturedView}"/>
</event>Instead of this:
<event type="org.jboss.seam.security.postAuthenticate">
<action execute="#{redirect.returnToCapturedView}"/>
</event>In your components.xml file.
-
4. Re: Redirect after login and logout to the same page
kraizzee Apr 12, 2012 1:11 AM (in response to cacelis)I have already tried that too. and it doesn't work either.
-
5. Re: Redirect after login and logout to the same page
serkan Apr 12, 2012 10:51 AM (in response to kwutzke)First of all:
- are those pages that require authentication have login-required=true set ?
- what did you put in pages.xml for login-page= ?
- how do you authenticate ? -basic or with IdentityManager ? (just to make sure that the seam authentication events are triggered)
- do you also have this event registered in your components.xml ?
<event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
</event>
-
6. Re: Redirect after login and logout to the same page
serkan Apr 12, 2012 11:03 AM (in response to kwutzke)And btw, you only need these 2 events (for auto redirecting) in components.xml:
<!-- Events -->
<event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
</event>
<event type="org.jboss.seam.security.loginSuccessful">
<action execute="#{redirect.returnToCapturedView}"/>
</event>