Originally posted by Gaurav Gambhir:
The values specified in Deployment Descriptor for <session-timeout> is always in minutes
and setMaxInactiveInterval() method accepts value in seconds.
I would remember it like:
DD is for long term perspective and if you need longer session timeout interval (i.e. minutes) go for it.
But if your session is short lived, you can set it progrmatically (i.e. seconds)