code: public static void forwardRequest(
          String target,
          Map<String, String[]> params,
          HttpServletRequest req,
          HttpServletResponse res)
      throws IOException, ServletException {
  
          // cast the request back to a flex request so the parameter map can be accessed
          CmsFlexRequest f_req = (CmsFlexRequest)req;
          // set the parameters
          f_req.setParameterMap(params);
          // check for links "into" OpenCms, these may need the webapp name to be removed
          String vfsPrefix = OpenCms.getStaticExportManager().getVfsPrefix();
          if (target.startsWith(vfsPrefix)) {
              // remove VFS prefix (will also work for empty vfs prefix in ROOT webapp case with proxy rules)
              target = target.substring(vfsPrefix.length());
              // append the servlet name
              target = OpenCms.getSystemInfo().getServletPath() + target;
          }
          // forward the request
          f_req.getRequestDispatcher(target).forward(f_req, res);
      }
docs: Forwards the response to the given target, with the provided parameter map.<p>
  
  The target URI must NOT have parameters appended like for example <code>?a=b&amp;c=d</code>.
  The values in the provided map must be of type <code>String[]</code>. If required, use
  <code>{@link #createParameterMap(Map)}</code> before calling this method to make sure
  all values are actually of the required array type.<p>
  
  @param target the target to forward to (may NOT contain parameters like <code>?a=b&amp;c=d</code>)
  @param params the parameter map (the values must be of type <code>String[]</code>
  @param req the request to forward
  @param res the response to forward
  
  @throws IOException in case the forwarding fails
  @throws ServletException in case the forwarding fails