There are two general methods:
1. Write the Home Page following two:
the HttpSession = Request.getSession the session (to true);
session.setMaxInactiveInterval (3600); // 3600 seconds, 3600 seconds Note that the server, not the client end
2. web.xml project provided:
<the session-config>
<-the session timeout> 60 </-the session timeout>
</ the session-config>
60 here is 60 minutes.
Another method provided in the server side, because the different server configurations different, this is not to say, two or more will be enough.
session how to configure the expiration time
Guess you like
Origin www.cnblogs.com/19322li/p/11114461.html
Recommended
Ranking