What is the default session timeout for a Java EE website?
问题 If I do not specify the following in my web.xml file: <session-config> <session-timeout>10</session-timeout> </session-config> What will be my default session timeout? (I am running Tomcat 6.0) 回答1: If you're using Tomcat, it's 30 minutes. You can read more about it here. 回答2: You can also set this in code, for a specific session using the HttpSession setMaxInactiveInterval API: Specifies the time, in seconds, between client requests before the servlet container will invalidate this session.