[OmniFaces utilities] The
hasSessionTimedOut()
method returns whether the HTTP session has been timed out for the current request. This is helpful if you need to distinguish between a first-time request on a fresh session and a first-time request on a timed out session, for example to display "Oops, you have been logged out because your session has been timed out!".Method:
Usage:
import
org.omnifaces.util.Faces;
...
boolean
timeout = Faces.hasSessionTimedOut();
if(timeout){
// do something
} else {
// do something else
}
Niciun comentariu :
Trimiteți un comentariu