• Post Reply Bookmark Topic Watch Topic
  • New Topic

invalidate  RSS feed

 
Chris Voge
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

We've created a JSF application. I'm trying to create a logoff page and I am using the invalidate method to cancel the existing session. I am having problems when I try and logoff. I get an IllegalStateException when I call the invalidate method. It also spits out some session info:

Session Object Internals:
id : 6cd3bA2rujbrKiMye4QNH8g
hashCode : 1645098090
create time : Sat Mar 18 13:47:44 CST 2006
last access : Sat Mar 18 13:48:15 CST 2006
max inactive interval : 900
user name : anonymous
valid session : false
new session : false

Why would my session be false ? Is there a way to check if an existing session is true or false. Is there something special I need to do in the login code? I appreciate any assistance.

Chris.
 
Chris Voge
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone have any idea ?

Thanks

Chris
 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you grabbing a hold of the session
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like maybe your logoff method is being called more than once, so when the second attempt to invalidate is made, there's nothing there to invalidate.

JSF can be a little tricky that way.
 
Chris Voge
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I figured it out.

I had to user the <redirect/> tag in my
navigation rule in the faces.config file. It
somehow stops the faces request and initiates
a HTTP client redirect.

I think, without this, it chokes in the FacesServlet
somewhere.

Thanks for your help everbody.

Chris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!