This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sessions with JSF  RSS feed

 
abhi jhanduwala
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to check if the session for the user exists or not



It doesnt seem to work- I always find the session.
I thought if I pass false in getSession()- it wont create a session for me and return a session- only if one existed

What could I be missing ?

Env:
Tomcat 5.5 on Windows
IE 7.x
JSF 1.1
 
Tim Holloway
Bartender
Posts: 18661
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're probably trying to write a DIY login system, aren't you? I've got a long list of reasons why DIY is a bad idea compared to the JEE-standard security system.

However:

If your method is in a session-scope bean, or if in order to get access to that bean you're referencing items with session-scope objects, JSF will automatically create a session.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!