[OmniFaces utilities] The
getSessionMaxInactiveInterval()
method returns the HTTP session timeout in seconds. This implicitly creates the session if one doesn't exist.[OmniFaces utilities] The
setSessionMaxInactiveInterval()
method sets the HTTP session timeout in seconds. A value of 0 or less means that the session should never timeout.Method Faces#getSessionMaxInactiveInterval() - get the HTTP session timeout in seconds:
See also: Faces#getContext() | Faces#getSession()
Method Faces#setSessionMaxInactiveInterval() - set the HTTP session timeout in seconds:
See also: Faces#getContext() | Faces#getSession()
Usage:
import
org.omnifaces.util.Faces;
...
// default HTTP
session timeout, e.g. 1800
int interval
= Faces.getSessionMaxInactiveInterval();
//
explicitly set the HTTP session timeout, e.g. 4000
// now the
Faces#getSessionMaxInactiveInterval() will return 4000
Faces.setSessionMaxInactiveInterval(4000);
Niciun comentariu :
Trimiteți un comentariu