code: public static boolean isSessionEncodedInUrl(String encodedUrl, String sessionIdName) {
          int sessionIdIndex = encodedUrl.indexOf(getSessionIdSubstring(sessionIdName));
          return sessionIdIndex >= 0;
      }
docs: Returns whether the session ID is encoded into the URL.
  
  @param encodedUrl
  the url to check
  @param sessionIdName
  the name of the session ID, e.g. jsessionid
  @return boolean value, true if session ID is encoded into the URL.