code: public static String getSessionId(final HttpServletRequest pRequest) {
          HttpSession session = pRequest.getSession();
  
          return (session != null) ? session.getId() : null;
      }
docs: Gets the unique identifier assigned to this session.
  The identifier is assigned by the servlet container and is implementation
  dependent.
  
  @param pRequest The HTTP servlet request object.
  @return the session Id