I can logout user after defined time of inactivity.
<session-timeout>240</session-timeout>
But, is there some way to logout in specified time, or better, for example until 5 minutes of inactivity after specified time.?
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 change the session timeout by
HttpSession#setMaxInactiveInterval()wherein you can specify the desired timeout in seconds.When you want to cover a broad range of requests for this, e.g. all pages in folder
/adminor something, then the best place to do this is to create aFilterwhich is mapped on theFacesServletwhich does roughly the following job:In a JSF managed bean the session is available by
ExternalContext#getSession():Or when you’re already on JSF 2.1, then you can also use the new
ExternalContext#setSessionMaxInactiveInterval()which delegates to exactly that method.