Edit Edit

Java Servlet FAQ


When does a session timeout?


You can get the timeout period in seconds by calling HttpSession's getMaxInactiveInterval():

public int getMaxInactiveInterval()

You can set the timeout period in seconds by calling HttpSession's setMaxInactiveInterval():

public void setMaxInactiveInterval(int interval)

If the timeout period is set to -1, the session never times out.







Last updated 12/19/1999 08:39:34 PM