[OmniFaces utilities] The
getSessionId()
method returns a string containing the unique identifier assigned to this session. The identifier is assigned by the servlet container and is implementation dependent.Method:
See also: Faces#getContext() | Faces#getSession()
Usage:
Returns the unique
identifier assigned to this session:
import
org.omnifaces.util.Faces;
...
// e.g. XY4i-kp_0NIDotbQaugGaM3P
String
sessionId = Faces.getSessionId();
This is the
unique identifier that is returned usually stored on client as a cookie with
name JSESSIONID,
and can be also collected via Faces#getRequestCookie():
import
org.omnifaces.util.Faces;
...
// e.g. XY4i-kp_0NIDotbQaugGaM3P
String
sessionId = Faces.getRequestCookie("JSESSIONID");
Niciun comentariu :
Trimiteți un comentariu