code: private String prependSiteRoot(String url) {
  
          String site = getCms().getRequestContext().getSiteRoot();
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(site) || OpenCms.getSiteManager().isSharedFolder(site)) {
              site = OpenCms.getSiteManager().getDefaultUri();
              if (CmsStringUtil.isEmptyOrWhitespaceOnly(site)
                  || (OpenCms.getSiteManager().getSiteForSiteRoot(site) == null)) {
                  return OpenCms.getSiteManager().getWorkplaceServer() + url;
              } else {
                  return OpenCms.getSiteManager().getSiteForSiteRoot(site).getUrl() + url;
              }
          }
          return OpenCms.getSiteManager().getSiteForSiteRoot(site).getUrl() + url;
      }
docs: Prepends the site-root to the given URL.<p>
  
  @param url the URL
  
  @return the absolute URL