Examples of sendRedirect()


Examples of com.ibm.commons.runtime.Context.sendRedirect()

      }

      // redirect to the initial page
      String applicationPage = oAuthHandler.getApplicationPage();
      if (StringUtil.isNotEmpty(applicationPage)) {
        context.sendRedirect(applicationPage);
      }
    } catch (Exception e) {
      throw new ServletException(e);
    }
  }
View Full Code Here

Examples of javax.portlet.ActionResponse.sendRedirect()

        PortletResponse portletResponse = ((PortletServletResponse)servletResponse).getPortletResponse();
        if (portletResponse instanceof ActionResponse)
        {
            ActionResponse actionResponse = (ActionResponse)portletResponse;
            String redirectURL = actionResponse.encodeURL(url.toString());
            actionResponse.sendRedirect( redirectURL );
        }
        else
        {
          log.error("Unable to redirect the portlet RenderRequest to " + url.toString());
        }
View Full Code Here

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

            .println("========================================================");
      }
    } finally {
      HttpServletResponse hResponse = (HttpServletResponse) servletResponse;
      String fileUrl = StringUtils.join(fileNames, ",");
      hResponse.sendRedirect(this.finishUrl
          + "?fileUrl='" + fileUrl + "'");
    }
  }
}
View Full Code Here

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

        // 从SNA会话服务器上获取snaId
        String redirectUrl = this.sessionServerUrl + "?sourceUrl="
            + hRequest.getRequestURL() + ";jsessionid="
            + session.getId() + queryString;
        hResponse.sendRedirect(redirectUrl);
        return;
      }

      // 保存snaId到当前会话
      if (session.getAttribute(SNAIdRequestServlet.SNA_ID) == null) {
View Full Code Here

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

        queryString = queryString.replaceAll(SNAIdRequestServlet.SNA_ID
            + "=" + snaId, "");
        if (queryString.startsWith("&"))
          queryString = queryString.replaceFirst("&", "?");
        // 重定向回原始页面
        hResponse.sendRedirect(hRequest.getRequestURL() + queryString);
        return;
      }
    }

    String uri = hRequest.getRequestURI();
View Full Code Here

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

        dispatcher.include(request, response);
    }

    public void redirect(String location) throws IOException {
        HttpServletResponse response = (HttpServletResponse) super.getVariable("response");
        response.sendRedirect(location);
    }   
}
View Full Code Here

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

    } else {
      final String encodedServiceUrl = CommonUtils.constructServiceUrl(request, response, null,
          config.getLocalServer(), config.getArtifactName(), config.isEncode());
      final String redirectUrl = CommonUtils.constructRedirectUrl(config.getLoginUrl(), "service",
          encodedServiceUrl, config.isRenew(), false);
      response.sendRedirect(redirectUrl);
    }
  }

  public CasConfig getConfig() {
    return this.config;
View Full Code Here

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

    // 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.sendRedirect()

    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.sendRedirect()

      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
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.