Examples of sendRedirect()


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

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

      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

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

          httpResponse.setHeader("Connection", "close");
            return;
        }
      try {
        if (getDao().getGroupDao().getGuestsGroup() == null) {
          httpResponse.sendRedirect("/setup");
          return;
        }
        PageEntity page = getPage(url, httpRequest);
        if (page != null) {
          renderPage(httpRequest, httpResponse, page, url);
View Full Code Here

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

          renderMessage(httpResponse, Messages.get("login_not_configured"));
          return;
        }
         session.setAttribute(AuthenticationFilter.ORIGINAL_VIEW_KEY,
             httpRequest.getRequestURI());
         httpResponse.sendRedirect(httpRequest.getContextPath()
             + config.getSiteUserLoginUrl());
      }
    }

  private boolean servedFromCache(String url,  HttpServletResponse response)
View Full Code Here

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

                    synchronized (req.getSession()) {
                        String url = navigationManager.getCurrentPage();
                        String rewrittenUrl = ((urlRewriter != null) ? urlRewriter.rewriteUrl(url) : url);
                        String fullUrl = req.getContextPath() + rewrittenUrl;
                        HttpServletResponse res = (HttpServletResponse) servletResponse;
                        res.sendRedirect(fullUrl);
                    }
                }
            }
        }
    }
View Full Code Here

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

              setupBean.clear();
              setupBean.setup();
              logger.info("Setup was successfully completed.");
              setupBean.loadDefaultSite();
            }
          httpResponse.sendRedirect("/");
          return;
        }
        //startProfile();
        chain.doFilter(request, response);
        //endProfile(httpRequest.getRequestURL().toString());
View Full Code Here

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

      if (url.startsWith(CMS)) {
        String originalUrl = httpRequest.getRequestURI()
          + (httpRequest.getQueryString() == null ? "" :
            "?" + httpRequest.getQueryString());
        session.setAttribute(ORIGINAL_VIEW_KEY, originalUrl);
        httpResponse.sendRedirect(httpRequest.getContextPath()
            + LOGIN_VIEW);
        return;
      }
    }
    else {
View Full Code Here

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

      }
    }
    else {
      ctx.setUser(user);
      if (url.startsWith(CMS) && ctx.getUser().isSiteUser()) {
        httpResponse.sendRedirect("/");
        return;
      }     
    }
    chain.doFilter(request, response);
  }
View Full Code Here

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

    {

      if (command == null || command.equals(""))
      {
        forward = false;
        response.sendRedirect(MenuPrinter.ABOUT.getName());
        return;
      }
      Page currentPage = menuPrinter.getCurrentPage();
     
      if (currentPage != null && !currentPage.isEnabled(_mbsc))
View Full Code Here

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

     
      if (currentPage != null && !currentPage.isEnabled(_mbsc))
      {
        forward = false;
        request.getSession().setAttribute(Attributes.WARN, "The page " + command + " is not available");
        response.sendRedirect(MenuPrinter.ABOUT.getName());
        return;
      }
       
      if (currentPage != null)
      {
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.