Hi there,
If you are still struggling with this problem, try forcing a redirect to
your welcome.xhtml page, using this navigation-rule in your
faces-config.xml:
<navigation-rule>
<display-name>Login Rules</display-name>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>LOGOFF_OK</from-outcome>
<to-view-id>/welcome.xhtml</to-view-id>
<redirect /> <!-- FORCES THE REDIRECTION -->
</navigation-case>
</navigation-rule>
and in your logout action:
public String logout() {
if (currentUser.isAuthenticated()) {
currentUser.logout();
}
return "LOGOFF_OK";
}
Let me know if this helps.
Regards,
Deluan
On Mon, Nov 8, 2010 at 10:44 AM, 0xsven <[email protected]> wrote:
>
> Hello,
>
> I am using Shiro. When I tried to logout Shiro correctly logs my session
> out
> but I am not redirected to my login page what I want.
>
> I tried two different appraches:
>
> 1. Using Shiro.ini:
> I includet following below [main]:
> authc.loginUrl = /welcome.xhtml
>
> => That doesn't work!
>
> 2. I tried to use JSF Navigation:
> public String logout() {
> if (currentUser.isAuthenticated()) {
> currentUser.logout();
> }
> return "welcome.xhtml";
> }
> => That doesn't work either...
>
> Maybe the problem lies within facelets :-(
> Does somebdy know how to fix that?
>
> Cheers..
> --
> View this message in context:
> http://shiro-user.582556.n2.nabble.com/Logout-problem-tp5716711p5716711.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>