docs: protected void showResource(HttpServletRequest req, HttpServletResponse res) {
  
          CmsObject cms = null;
          try {
              cms = initCmsObject(req, res);
  
              if (cms.getRequestContext().getCurrentProject().isOnlineProject()) {
                  String uri = cms.getRequestContext().getUri();
                  if (uri.startsWith(CmsWorkplace.VFS_PATH_SITES)) {
                      // resources within the sites folder may only be called with their site relative path
                      // this should prevent showing pages from other sites with their root path
                      throw new CmsVfsResourceNotFoundException(
                          org.opencms.main.Messages.get().container(org.opencms.main.Messages.ERR_PATH_NOT_FOUND_1, uri));
                  }
                  if (OpenCms.getStaticExportManager().isExportLink(cms, uri)) {
                      // if we used the request's query string for getRfsName, clients could cause an unlimited number
                      // of files to be exported just by varying the request parameters!
                      String url = m_linkManager.getOnlineLink(cms, uri);
                      res.sendRedirect(url);
                      return;
                  }
              }
              List<CmsSiteMatcher> currentSiteAliase = m_siteManager.getCurrentSite(cms).getAliases();
              CmsSiteMatcher currentSiteMatcher = cms.getRequestContext().getRequestMatcher();
              if (currentSiteAliase.contains(currentSiteMatcher.forDifferentScheme("http"))
                  || currentSiteAliase.contains(currentSiteMatcher.forDifferentScheme("https"))) {
                  int pos = currentSiteAliase.indexOf(currentSiteMatcher.forDifferentScheme("http"));
                  if (pos == -1) {
                      pos = currentSiteAliase.indexOf(currentSiteMatcher.forDifferentScheme("https"));
                  }
                  if (currentSiteAliase.get(pos).isRedirect()) {
                      res.sendRedirect(
                          m_siteManager.getCurrentSite(cms).getUrl() + req.getContextPath() + req.getPathInfo());
                      return;
                  }
              }
  
              // user is initialized, now deliver the requested resource
              CmsResource resource = initResource(cms, cms.getRequestContext().getUri(), req, res);
              if (resource != null) {
                  // a file was read, go on process it
                  m_resourceManager.loadResource(cms, resource, req, res);
                  m_sessionManager.updateSessionInfo(cms, req);
              }
  
          } catch (Throwable t) {
              errorHandling(cms, req, res, t);
          }
      }