if i close my browser without invalidating the session then i don’t want it to access my application without being log-in again.
and don’t want my user to get assess to the restricted user pages by using back button.
how can i do this in JSF 2.0?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t do this programmatically in a reliable manner. The session will however automatically expire after 30 minutes. If you open a new browser, then a new session will be created and the previous session won’t be accessible anymore.
You need to instruct the browser to not cache those restricted user pages. You can do this by creating a filter which is mapped on an URL pattern which covers those pages and does the following job in
doFilter()method:This way the browser is forced to send a full HTTP request everytime instead of showing the page from the browser cache.