code: public static String removeOpenCmsContext(final String path) {
  
          String context = OpenCms.getSystemInfo().getOpenCmsContext();
          if (path.startsWith(context + "/")) {
              return path.substring(context.length());
          }
          String renderPrefix = OpenCms.getStaticExportManager().getVfsPrefix();
          if (path.startsWith(renderPrefix + "/")) {
              return path.substring(renderPrefix.length());
          }
          return path;
      }
docs: Given a path to a VFS resource, the method removes the OpenCms context,
  in case the path is prefixed by that context.
  @param path the path where the OpenCms context should be removed
  @return the adjusted path