this is what i get from the FAQs Scwcd Hints in javaranch,
6) A value of 0 or a negative value in the session-timeout of the session-config in the web.xml file (which is expressed in minutes) indicates that the session never expires. However, this can be overridden using the setMaxInactiveInterval() in the code where the time is in expressed in seconds. Always Remember web.xml in minutes and the code in seconds.
or if still you have some confusion regarding this, then use search facility in javaranch, apply key word "session web.xml" you will definitely find some threads with related topic.