aktuelle session id auslesen jsf

JavaScript
FacesContext fCtx = FacesContext.getCurrentInstance();
HttpSession session = (HttpSession) fCtx.getExternalContext().getSession(false);
String sessionId = session.getId();

Source

Also in JavaScript: