docs: public CmsStaticExportData getVfsNameInternal(CmsObject cms, String rfsName)
      throws CmsVfsResourceNotFoundException {
  
          String storedSiteRoot = cms.getRequestContext().getSiteRoot();
          CmsSite currentSite = OpenCms.getSiteManager().getSiteForSiteRoot(storedSiteRoot);
          try {
              cms.getRequestContext().setSiteRoot("/");
  
              // try to find a match with the "exportname" folders
              String path = rfsName;
              // in case of folders, remove the trailing slash
              // in case of files, remove the filename and trailing slash
              path = path.substring(0, path.lastIndexOf('/'));
              // cache the export names
              Map<CmsExportname, String> exportnameMapping = getExportnames();
              // in case of folders, remove the trailing slash and in case of files, remove the filename and trailing slash
              while (true) {
                  // exportnameResources are only folders!
                  String expName = exportnameMapping.get(new CmsExportname(path + "/", currentSite));
                  if (expName == null) {
                      expName = exportnameMapping.get(new CmsExportname(path + "/", null));
                  }
                  if (expName == null) {
                      if (path.length() == 0) {
                          break;
                      }
                      path = path.substring(0, path.lastIndexOf('/'));
                      continue;
                  }
                  // this will be a root path!
                  String vfsName = expName + rfsName.substring(path.length() + 1);
                  try {
                      return readResource(cms, vfsName);
                  } catch (CmsVfsResourceNotFoundException e) {
                      // if already checked all parts of the path we can stop here.
                      // This is the case if the "/" is set as "exportname" on any vfs resource
                      if (path.length() == 0) {
                          break;
                      }
                      // continue with trying out the other exportname to find a match (may be a multiple prefix)
                      path = path.substring(0, path.lastIndexOf('/'));
                      continue;
                  } catch (CmsException e) {
                      // should never happen
                      LOG.error(e.getLocalizedMessage(), e);
                      break;
                  }
              }
  
              // try to read name of export resource by reading the resource directly
              try {
                  return readResource(cms, rfsName);
              } catch (Throwable t) {
                  // resource not found
                  if (LOG.isDebugEnabled()) {
                      LOG.debug(
                          Messages.get().getBundle().key(Messages.ERR_EXPORT_FILE_FAILED_1, new String[] {rfsName}),
                          t);
                  }
              }
  
              // finally check if its a modified jsp resource
              int extPos = rfsName.lastIndexOf('.');
              // first cut of the last extension
              if (extPos >= 0) {
                  String cutName = rfsName.substring(0, extPos);
                  int pos = cutName.lastIndexOf('.');
                  if (pos >= 0) {
                      // now check if remaining String ends with ".jsp"
                      String extension = cutName.substring(pos).toLowerCase();
                      if (".jsp".equals(extension)) {
                          return getVfsNameInternal(cms, cutName);
                      }
                  }
              }
          } finally {
              cms.getRequestContext().setSiteRoot(storedSiteRoot);
          }
          throw new CmsVfsResourceNotFoundException(
              org.opencms.db.generic.Messages.get().container(
                  org.opencms.db.generic.Messages.ERR_READ_RESOURCE_1,
                  rfsName));
      }