code: public static String getSessionEncodedUrl(String url, String sessionIdName, String sessionId) {
          return url + getSessionIdSubstring(sessionIdName) + sessionId;
      }
docs: Returns a url with the session encoded into the URL
  
  @param url the URL to encode
  @param sessionIdName the name of the session ID, e.g. jsessionid
  @param sessionId the session ID
  @return URL with the session encoded into the URL