This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes JSF and the fly likes Sessions with JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Sessions with JSF" Watch "Sessions with JSF" New topic

Sessions with JSF

abhi jhanduwala

Joined: Nov 13, 2008
Posts: 1
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 ?

Tomcat 5.5 on Windows
IE 7.x
JSF 1.1
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16476

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.


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.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Sessions with JSF