• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session Management in JSF

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is it possible to manage session in jsf??
means when a user logs in he can access all the pages and when he log out. he cant access some specific pages. ???

Please help me out.
All kinds of suggestions and solutions are warmly welcome
regards.
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Amir Iqbal:
is it possible to manage session in jsf??


Of course. JSF just runs on top of JSP/Servlets.

means when a user logs in he can access all the pages and when he log out. he cant access some specific pages. ???


You normally use a Filter for that.

Pseudo:

and map it on an url-pattern covering the protected pages.
 
Amir Iqbal
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Alot Bauke. for your Help
would you please tell how can i store username in Session. and how can i remove it when user logs off .
if Possible then please do put code snipet .
Regards
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Amir Iqbal:
Thanks Alot Bauke. for your Help
would you please tell how can i store username in Session. and how can i remove it when user logs off .


In JSF: use ExternalContext#getSessionMap().
In JSP/Servlet: use HttpSession#get/setAttribute().


if Possible then please do put code snipet .


You should not ask for code.
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Bauke Scholtz .
One more time you help me.

remember me?
 
The longest recorded flight time of a chicken is 13 seconds. But that was done without this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic