Package javax.servlet.http

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


        // 从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

        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

        dispatcher.include(request, response);
    }

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

    } 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

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

    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

      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

      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

      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.