code: public static String removeSessionId(String sessionId, String page) {
          String regexp = ";?jsessionid=" + Pattern.quote(sessionId);
          return page.replaceAll(regexp, "");
      }
docs: Removes the jsessionid that may have been added to a URI on a java application server.
  
  @param sessionId
  the value of the sessionId that can also be found in a JSESSIONID cookie
  @param page
  the html code of the page
  @return the fixed html