I have a J2EE application which uses JSF and Spring 3.x. My web app is developed in *.xhtml, and I have used JSF ManagedBeans. I want to redirect to login page when the session has elapsed the timeoout. I am bit new and need to know the following.
Hope the requirement is clear. Just stating the requirements of my problem again
Tech Stack JSF with ManagedBeans(Have used face-config.xml etc..) Spring for the service layer Hibernate for the DAO layer and in defining the entities.
If by "idle" you mean not sending any request to the server then you have to set the session-timeout
in your web.xml
file. It should look like this for a 30 minutes timeout :
<session-config>
<session-timeout>30</session-timeout>
</session-config>
To handle the redirection to login when the session timeout have a look at this answer .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.