Fact | Web.xml | Method in HttpSession |
How to specify | The <session-timeout> element defines the default session timeout interval | setMaxInactiveInterval(int) |
Unit | minutes | Seconds |
Exact syntax | <session-config> | public void setMaxInactiveInterval(int seconds) |
How to never expire | A negative value or zero value causes the session never to expire. | If a negative value is passed to this method, the session will never time out. |
Applicable | for all sessions created in the Web application | Only for Session explicitly created for the particular request |
Design Aspect | Declarative way | Programmatic way |
What happens when you set setMaxInactiveInterval(0) --------------------? Think.
No comments:
Post a Comment