/**
  * Prefix the context path, our webapp emulator and append the request
  * parameters to the redirection string before calling sendRedirect.
  *
  * @param $request WebAppRequest
  * @param $redirectPath string
  * @return string
  */
 protected function getURL(\Innomatic\Webapp\WebAppRequest $request, $redirectPath)
 {
     $result = '';
     $container = \Innomatic\Webapp\WebAppContainer::instance('\\Innomatic\\Webapp\\WebAppContainer');
     $processor = $container->getProcessor();
     $webAppPath = $request->getUrlPath();
     if (!is_null($webAppPath) && $webAppPath != '/') {
         $result = $request->generateControllerPath($webAppPath, true);
     }
     $result .= '/webservices' . $redirectPath;
     $query = $request->getQueryString();
     if (!is_null($query)) {
         $result .= '?' . $query;
     }
     return $result;
 }
 /**
  * Prefix the context path, our webapp emulator and append the request
  * parameters to the redirection string before calling sendRedirect.
  *
  * @param $request WebAppRequest
  * @param $redirectPath string
  * @return string
  */
 protected function getURL(\Innomatic\Webapp\WebAppRequest $request, $redirectPath)
 {
     $result = '';
     $webAppPath = $request->getUrlPath();
     if (!is_null($webAppPath) && $webAppPath != '/') {
         $result = $request->generateControllerPath($webAppPath, true);
     }
     $result .= '/domain' . $redirectPath;
     $query = $request->getQueryString();
     if (!is_null($query)) {
         $result .= '?' . $query;
     }
     return $result;
 }