I´m trying to make a simple login system with Java EE (Hibernate, Glassfish, JSF). I am done with the handling of user id data i.e the users can enter username and password and it checks with the database and logs them in if its correct. But, I want to include certain pages that only logged in members can see. How can I keep track if a member is logged in ? and how can I get the information of that specific user?
Ex: I login and want to change my password, so I go to a page with my user details and enters a new password. How can I manage this serverside ?
Do I use a servlet? Cookies? Sessions? I´m lost (a)
I hope my question is clear, and would really appreciate some help. Thanks alot in advance!