Verarbeitet den von der Action zurueckgegebenen ActionForward.  Leitet auf die Resource weiter,
die der ActionForward bezeichnet.

@param  Request       $request
@param  Response      $response
@param  ActionForward $forward
775856
protected function processActionForward(Request $request, Response $response, ActionForward $forward) {
        $module = $this->module;

        if ($forward->isRedirect()) {
            $this->cacheActionMessages($request);
            $path = $forward->getPath();

            if (isset(parse_url($path)['host'])) {               // check for external URI
                $url = $path;
            }
            else {
                $moduleUri = $request->getApplicationBaseUri().$module->getPrefix();
                $url = $moduleUri.ltrim($path, '/');
            }
            $response->redirect($url, $forward->getRedirectType());
        }
        else {
            $path = $forward->getPath();
            $tile = $module->findTile($path);

            if (!$tile) {
                // $path ist ein Dateiname, generische Tile erzeugen
                $tilesClass = $module->getTilesClass();
                /** @var Tile $tile */
                $tile = new $tilesClass($this->module);
                $tile->setName(Tile::GENERIC_NAME)
                     ->setFileName($path)
                     ->freeze();
            }
            $tile->render();
        }
    }
425049
public function setForward(ActionForward $forward) {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');
        $name = $this->name ? ' name="'.$this->name.'"':'';
        $path = $this->path ? ' path="'.$this->path.'"':'';

        if ($this->actionClassName) throw new StrutsConfigException('<mapping'.$name.$path.': Only one of "action", "include", "forward" or "redirect" can be specified.');

        $this->forward = $forward;
        return $this;
    }
1344252
public function dispatch(Request $request, Response $response, $next = null)
    {
        $controller = $this->currentController;

        $controller->setRequest($request)->setResponse($response);

        $this->prepareExecute();

        // @event: onPackageBeforeExecute
        $this->getDispatcher()->triggerEvent('onPackageBeforeExecute', [
            'package' => $this,
            'controller' => &$controller,
            'task' => $controller,
        ]);

        $result = $controller->execute();

        $result = $this->postExecute($result);

        // @event: onPackageAfterExecute
        $this->getDispatcher()->triggerEvent('onPackageAfterExecute', [
            'package' => $this,
            'controller' => $controller,
            'result' => &$result
        ]);

        $response = $controller->getResponse();

        if ($result !== null) {
            // Render view if return value is a view object,
            // don't use (string) keyword to make sure we can get Exception when error occurred.
            // @see  https://bugs.php.net/bug.php?id=53648
            if ($result instanceof AbstractView) {
                $result = $result->render();
            } elseif (is_stringable($result)) {
                $result = (string) $result;
            } elseif (is_array($result) || is_object($result)) {
                $result = json_encode($result);
            }

            $response->getBody()->write((string) $result);
        }

        return $response;
    }
1204996
def tryForwarding(self, request: Request):
        
        cannot_reason_msg = self.canForward(request)
        if cannot_reason_msg is None:
            # If haven't got the client request(REQUEST) for the corresponding
            # propagate request(PROPAGATE) but have enough propagate requests
            # to move ahead
            self.forward(request)
        else:
            logger.trace("{} not forwarding request {} to its replicas "
                         "since {}".format(self, request, cannot_reason_msg))
32383
def forward(self, search: str):
        
        url_path = "/api/forward/{search}".format(search=search)
        return self._request(path=url_path)
350205
public function forward($forward = [])
    {
        $controller = isset($forward['controller'])
            ? $forward['controller']
            : null;

        $action = isset($forward['action'])
            ? $forward['action']
            : null;
        
        $params = isset($forward['params'])
            ? $forward['params']
            : [];

        $this->setControllerName($controller);
        $this->setActionName($action);
        $this->setParams($params);

        $this->isCallableOrException();
        return $this->dispatch();
    }
96056
public function dispatch(Request $request, Response $response = null)
	{
		$this->tranlate();
		$allowed = $this->hasIdentity();
		$this->view->flashMessenger = $this->flashMessenger();
		if($allowed instanceof \Zend\Http\PhpEnvironment\Response)
		     return $allowed;
		return parent::dispatch($request, $response);
	}
1131676
protected function processForwards(\SimpleXMLElement $xml) {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');

        // process global 'include' and 'redirect' forwards
        $elements = $xml->xpath('/struts-config/global-forwards/forward[@include] | /struts-config/global-forwards/forward[@redirect]') ?: [];

        foreach ($elements as $tag) {
            $name     = (string) $tag['name'];
            $include  = isset($tag['include' ]) ? (string)$tag['include' ] : null;
            $redirect = isset($tag['redirect']) ? (string)$tag['redirect'] : null;
            $alias    = isset($tag['alias'   ]) ? (string)$tag['alias'   ] : null;

            /** @var ActionForward $forward */
            $forward = null;

            if (is_string($include)) {
                if (is_string($redirect) || is_string($alias)) throw new StrutsConfigException('<global-forwards> <forward name="'.$name.'": Only one of "include", "redirect" or "alias" can be specified.');

                $this->tilesContext = [];
                if (!$this->isIncludable($include, $xml)) throw new StrutsConfigException('<global-forwards> <forward name="'.$name.'" include="'.$include.'": '.(strStartsWith($include, '.') ? 'Tile definition':'File').' not found.');

                if ($this->isTileDefinition($include, $xml)) {
                    $tile = $this->getTile($include, $xml);
                    if ($tile->isAbstract()) throw new StrutsConfigException('<global-forwards> <forward name="'.$name.'" include="'.$include.'": The included tile is a template and cannot be used as a "forward".');
                    /** @var ActionForward $forward */
                    $forward = new $this->forwardClass($name, $include, false);
                }
                else {
                    /** @var ActionForward $forward */
                    $forward = new $this->forwardClass($name, $this->findFile($include), false);
                    $forward->setLabel(substr($include, 0, strrpos($include, '.')));
                }
            }

            if (is_string($redirect)) {
                if (is_string($include) || is_string($alias)) throw new StrutsConfigException('<global-forwards> <forward name="'.$name.'": Only one of "include", "redirect" or "alias" can be specified.');

                /** @var ActionForward $forward */
                $forward = new $this->forwardClass($name, $redirect, true);     // TODO: URL validieren
            }
            $this->addGlobalForward($forward);
        }

        // process global 'alias' forwards
        $elements = $xml->xpath('/struts-config/global-forwards/forward[@alias]') ?: [];

        foreach ($elements as $tag) {
            $name  = (string)$tag['name' ];
            $alias = (string)$tag['alias'];

            if (isset($tag['include']) || isset($tag['redirect'])) throw new StrutsConfigException('<global-forwards> <forward name="'.$name.'": Only one of "include", "redirect" or "alias" can be specified.');

            $forward = $this->findForward($alias);
            if (!$forward) throw new StrutsConfigException('<global-forwards> <forward name="'.$name.'": Forward alias "'.$alias.'" not found.');

            $this->addGlobalForward($forward, $name);
        }
    }
174414
protected function setForwardClass($className) {
        if ($this->configured)                                         throw new IllegalStateException('Configuration is frozen');
        if (!is_class($className))                                     throw new StrutsConfigException('Class '.$className.' not found');
        if (!is_subclass_of($className, DEFAULT_ACTION_FORWARD_CLASS)) throw new StrutsConfigException('Not a subclass of '.DEFAULT_ACTION_FORWARD_CLASS.': '.$className);

        $this->forwardClass = $className;
    }
651650
protected function forward($uri, $filter = FALSE){
        $this->context->app->httpCore->executeHttpRequest(NULL, $uri, $filter);
    }
1276964
function Request_forward(route, params) {

        var request;

        if (router.trim(this.route, "/") === router.trim(route, '/')) {
            throw new error.HttpError(500, {
                route: route,
                params: params
            }, 'Cannot forward to same route');
        } else {

            this.stopPromiseChain();

            request = new Request({
                request: this.request,
                response: this.response,
                isForwarded: true,
                body: this.body
            }, router.createUrl(route, params));

            this.isRendered = true;

            logger.info('Request.forward.route:', {
                route: route,
                params: params
            });

            return request.parse();
        }
    }
1077363
final public function forward($path, $query=null)
    {
        $this->stop();
        
        $parts = parse_url($path);
        $path  = $parts['path'];
        $pathQuery = isset($parts['query']) ? $parts['query'] : null;
        
        if (strpos($path, '/') === 0) {
            $controller = Ioc::web()->getController($path);
        } else {
            $controller = $this->getModule()->getController($path);
        }
        
        if (!$controller) {
            $this->request = $this->request->withUri(Uri::createFromString($path));
            
            return $this->notFound();
        }
        
        if ($pathQuery && is_string($pathQuery)) {
            parse_str($pathQuery, $pathQuery);
        }
        if ($query && is_string($query)) {
            parse_str($query, $query);
        }
        $query = array_merge((array)$pathQuery, (array)$query);
        
        if ($query) {
            $this->request = $this->request->withQueryParams($pathQuery);
        }
        
        return $controller->handle($this->request, $this->response);
    }
754825
protected String getForward(HttpServletRequest req){
		String forward = req.getParameter(PARAM_FORWARD);
		if (forward==null)
			forward = DEFAULT_FORWARD;
		return forward;
	}
821791
protected function dispatch($request, $response)
    {
        $this->setRequest($request);
        $this->setResponse($response);
        if (!$this->responder) {
            $this->responder = Respond::getResponder();
        }
        return $this->_execInternalMethods();
    }
665426
protected function pass(Request $request, $catch = false)
    {
        $this->record($request, 'pass');

        return $this->forward($request, $catch);
    }
61299
protected function insertNearInternal($forward)
    {
        $this->checkNode(true);
        $item = $this->owner->getAttribute($this->itemAttribute);

        if ($item !== null) {
            $path = $this->node->getParentPath();
            $this->owner->setAttribute($this->pathAttribute, $path . $this->delimiter . $item);
        }

        $this->owner->setAttribute($this->depthAttribute, $this->node->getAttribute($this->depthAttribute));

        if ($this->treeAttribute !== null) {
            $this->owner->setAttribute($this->treeAttribute, $this->node->getAttribute($this->treeAttribute));
        }

        if ($this->sortable !== false) {
            if ($forward) {
                $this->behavior->moveAfter($this->node);
            } else {
                $this->behavior->moveBefore($this->node);
            }
        }
    }
898054
public function directoryAction(Request $request, $path)
    {
        $this->checkPreconditions($request, $path);
        $action = $request->query->get(self::REQUEST_PARAMETER_ACTION, '');
        $controller = $this->extensionRegistry->resolveDirectoryAction($action);

        return $this->forward(
            $controller,
            ['path' => $path],
            $request->query->all()
        );
    }