Package javax.servlet.http

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


          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

                    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

              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

      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

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

    {

      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

     
      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

          {
            action.setAjaxContent(request, response);
            return;
          }
          else
            response.sendRedirect(command);
        }
      }

      if (command.equals(MenuPrinter.CONFIG_SIP.getName()))
        doSipConfig(request);
View Full Code Here

        disp.forward(req, res);
        return;
      }
    }
   
    res.sendRedirect(res.encodeRedirectURL(uri));
  }

  private FormLogin getFormLogin(Login login)
    throws ServletException
  {
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.