luni, 13 aprilie 2015

[OmniFaces utilities (2.0)] Check whether the HTTP session has already been created


[OmniFaces utilities] The hasSession() method returns whether the HTTP session has already been created.

Method:
Usage:

import org.omnifaces.util.Faces;
...
boolean hassession = Faces.hasSession();
if(hassession){
   // do something
} else {
  // do something else
}

Niciun comentariu:

Trimiteți un comentariu