code: public static String getSessionId(ExternalContext ec, boolean create)
      {
          Object session = ec.getSession(create);
          return (null != session) ? (String) _runMethod(session, "getId") : null;
      }
docs: Returns the current active session id or <code>null</code> if there is
  none.
  
  @param ec the current external context
  @param create create a new session if one is not created
  @return a string containing the requestedSessionId