Examples of encodeRedirectURL()


Examples of javax.faces.context.ExternalContext.encodeRedirectURL()

      if (REWRITE_PREFIX.equals(outcome))
      {
         String target = FacesRewriteLifecycleListener.getOriginalRequestURL((HttpServletRequest) externalContext
                  .getRequest());
         String redirectUrl = externalContext.encodeRedirectURL(target, null);
         try {
            externalContext.redirect(redirectUrl);
            return true;
         }
         catch (IOException e) {
View Full Code Here

Examples of javax.faces.context.ExternalContext.encodeRedirectURL()

        {
            viewParameters = parameters;
        }
       
        String actionEncodedViewId = getActionURL(context, viewId);
        String redirectEncodedURL = externalContext.encodeRedirectURL(actionEncodedViewId, viewParameters);
        return externalContext.encodeActionURL(redirectEncodedURL);
    }

    @Override
    public ViewDeclarationLanguage getViewDeclarationLanguage(
View Full Code Here

Examples of javax.faces.context.ExternalContext.encodeRedirectURL()

        // note that we cannot use this.getActionURL(), because this will
        // cause problems if the ViewHandler is wrapped
        String actionEncodedViewId = getViewHandler(context).getActionURL(context, viewId);
       
        ExternalContext externalContext = context.getExternalContext();
        String redirectEncodedURL = externalContext.encodeRedirectURL(actionEncodedViewId, viewParameters);
        return externalContext.encodeActionURL(redirectEncodedURL);
    }

    @Override
    public ViewDeclarationLanguage getViewDeclarationLanguage(
View Full Code Here

Examples of javax.faces.context.ExternalContext.encodeRedirectURL()

            params = getFullParameterList(context, viewId, parameters);
        } else {
            params = parameters;
        }
        ExternalContext ectx = context.getExternalContext();
        return ectx.encodeActionURL(ectx.encodeRedirectURL(Util.getViewHandler(context).getActionURL(context, viewId), params));

    }

    /**
     * @see ViewHandler#getViewDeclarationLanguage(javax.faces.context.FacesContext, String)
View Full Code Here

Examples of javax.faces.context.ExternalContext.encodeRedirectURL()

            params = getFullParameterList(context, viewId, parameters);
        } else {
            params = parameters;
        }
        ExternalContext ectx = context.getExternalContext();
        return ectx.encodeActionURL(ectx.encodeRedirectURL(Util.getViewHandler(context).getActionURL(context, viewId), params));

    }

    /**
     * @see ViewHandler#getViewDeclarationLanguage(javax.faces.context.FacesContext, String)
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.encodeRedirectURL()

    // Process internal context prefix
    int tilde = uri.indexOf("~");
    if (tilde != -1) {
      String path = uri.substring(tilde + 1);
      response.sendRedirect(response.encodeRedirectURL(buildURI(
          request.getContextPath() + path, request.getQueryString())));
      return;
    }

    // Try to resolve node from URI (without context path).
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.encodeRedirectURL()

    if (node == null && !servlets.matcher(nodePath).matches()) {
      String sourceURI = buildURI(nodePath, request.getQueryString());
      String targetURI = rewriteURI(sourceURI);
      if (!targetURI.equals(sourceURI)) {
        if (targetURI.contains("://")) {
          response.sendRedirect(response.encodeRedirectURL(targetURI));
        } else {
          response.sendRedirect(response.encodeRedirectURL(request
              .getContextPath() + targetURI));
        }
        return;
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.encodeRedirectURL()

      String targetURI = rewriteURI(sourceURI);
      if (!targetURI.equals(sourceURI)) {
        if (targetURI.contains("://")) {
          response.sendRedirect(response.encodeRedirectURL(targetURI));
        } else {
          response.sendRedirect(response.encodeRedirectURL(request
              .getContextPath() + targetURI));
        }
        return;
      }
    }
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.encodeRedirectURL()

      if (root == null) {
        root = Nodes.getRoot();
      }
      request.setAttribute("Root", root);
      if (node != null && root.getParent() == node) {
        response.sendRedirect(response.encodeRedirectURL(request
            .getContextPath() + root.getPath()));
        return;
      }
    }
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.encodeRedirectURL()

      return;
    }

    // Redirect if trailing slash is missing for containers.
    if (node.isContainer() && !uri.endsWith("/")) {
      response.sendRedirect(response.encodeRedirectURL(buildURI(
          uri + "/", request.getQueryString())));
    } else {
      // Set node into request scope and forward to dispatcher
      request.setAttribute(Node.class.getSimpleName(), node);
      request.setAttribute(Names.JEASE_SITE_DISPATCHER, dispatcher);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.