PhantomReference
PhantomReference

Reputation: 738

JSF2 - What is the default session timeout?

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.

Upvotes: 3

Views: 6438

Answers (1)

BalusC
BalusC

Reputation: 1108722

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.

Upvotes: 16

Related Questions