3

In JSF2 applications, what is the default session time-out when none is explicitly mentioned in web.xml file?

UPDATE: I am using Tomcat and please refer to the related post here regarding the default time-out in Tomcat.

Community
  • 1
  • 1
PhantomReference
  • 718
  • 2
  • 14
  • 27

1 Answers1

15

This is not related to JSF, but to servlets. Look, it's the web.xml, not faces-config.xml :) JSF is "just" a component based MVC framework which can run on top of servlets. Look, its MVC front controller FacesServlet is actually a servlet :)

The default is dependent on the target servlet container (Tomcat, GlassFish, WildFly, WebSphere, etc), however the canonical default they all agree on is 30 minutes. You can find it in the servlet container specific documentation, such as this section for Tomcat (emphasis mine).

maxInactiveInterval

The initial maximum time interval, in seconds, between client requests before a session is invalidated. A negative value will result in sessions never timing out. If the attribute is not provided, a default of 1800 seconds (30 minutes) is used.

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555