Hello,
I am creating a web app in JSF
RI with richfaces and facelets. I
have a session scoped managed been that stores preferences for the user who is
signed in.
The problem I am having is that when the user logs out. I invalidate the
session and send the user to the logout page. On it's way to the logout page,
it creates a new session for the user and instantiates the user managed bean
again. The user lands at the logout page, then clicks the link to the home
page. The system (properly) redirects him to the login page where he
authenticates and goes to the home page. However, at that point the session is
already there, so that he has the user principle of the new user with the User
bean of the old user.
I have, of course, checked to make sure that the logout page does not contain
any reference to the User bean. In fact, I created a new home page with no
reference to the user bean and the logout page has no reference to it, nor do
the phase listeners. I actually commented the bean out of the faces config file
and the modified home page / logout loop work fine without it (since it is not
called anywhere). Once I uncomment it, the bean instantiates itself again. None
of the other managed beans instatiate themselves with a new session, only this
one (there are 2 others).
I am sure I could work around this issue if I needed to, but I am trying to
understand what is going on with this?
On a separate but related note, I am having trouble making my logout page NOT
be run through the faces servlet. It is in the same directory and same
extension (.jsp) as my login.jsp page, and that page is not processed by the
servlet, but logout.jsp is.
BTW, we are looking to add another JSF/Portlet developer to our team. If
you are interested let me know. If you are interested and can help me fix
this, you are well on your way to a new job.
Thanks,
Rich