I wrote a backing method returning boolean isLoggedIn.
I use it to render the menu. So if not logged in, few menu links are visible.
But what if the user goes to addressbar and enters the xhtml webpage himself, which he should not be able to access if he is not logged in?
How can I make a check and auto redirect on these pages?
Once the user successfully logged in , store some attribute to session.When the user tries to access any page by typing URL in address bar, check whether this attribute is present in the session or not.Basically you need to check this attribute for every page.You can include this in a filter.