This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to handle session in jsf??  RSS feed

 
Balaji Kadam
Ranch Hand
Posts: 31
Hibernate Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

In servlet & jsp use httpsession to handle session. we create Httpsession's object and sets and gets attribute. Even we can check session attribue and decide whether page should be show to user or error/login page show.

How this functionality handle in jsf?

-Balaji
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JacaRanch, Balaji!

JSF uses Sessions automatically when you reference backing beans that are defined with session scope. You don't need to write any session code. In fact, one of the great frustrations for a lot of JSF users is that Session scope is required in many cases where Request scope would have been sufficient when using simpler J2EE application frameworks.

The only real issue here comes if you mix traditional servlets/JSPs with J2EE. Because J2EE will create sessions automatically as needed, code that expects a session doesn't exist yet will be surprised. This most commonly happens when people are expecting session to be the same thing as "logged in".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!