Invalidating a session in jsf
If they timed out or logged out webseal should have to logout them and they should be access the application until they login again.
If the guess is incorrect, a message is printed notifying the user that a smaller or a larger number should be entered and the game continues.Then follow the steps at the end of this tutorial to build and deploy.Actually, if this is your first experience with JSF, we recommend you try our JSF Kick Start tutorial first. The simplistic way of acheiving this is to wrap a Filter around the Faces servlet.We have already seen invalidate() method in session implicit object tutorial. Here we will see how to validate/invalidate a session.Figure 3: After the user enters a guess, the application tells the user if a smaller or a larger number should be tried. We are going to provide you with a JSF project skeleton directory structure which will be the starting point of our application. You should now have JSF project directory structure with a topmost folder called jsf Project. From this page you also have the option to play the game again.
Rename that folder to jsf Guess Number to make a more appropriate name for our application. The page flow in this example will look like the image below. Create the file in the Web Content/pages directory. The first line is a directive that tells where to find JSF tags that define HTML elements and the second is a directive that tells where to find JSF tags that define core JSF elements.
I acheived tha task using 'pkmslogout ' command appending to my URL.
But want to prevent the backbutton as well once they logged out or timed out. just clearing the header information in the session won't do any good, i think. Thanks Venin that case..you ask the user to login..u should navigate him to a new page with no standard buttons available in may sound creepy but it's a safer method.since there will be no such buttons like BACK, FORWARD etc. example of this type of login action is this website: indusind website click on login and observe the new page that pops up!
Of course, we think you should build this application from the beginning.
However, if you would like to run a finished application instead, you can download the file,
Method logout on request object establish null as the value returned when get User Principal, get Remote User, and get Auth Type is called on the request.