Package org.springframework.web.servlet.view

Examples of org.springframework.web.servlet.view.RedirectView


      return redirect(URIBuilder.fromUri(signInUrl).queryParam("error", "multiple_users").build().toString());
    }
  }

  private RedirectView redirect(String url) {
    return new RedirectView(url, true);
  }
View Full Code Here


        if (credentials != null) {
            // get user profile
            final CasProxyProfile casProxyProfile = (CasProxyProfile) client.getUserProfile(credentials, context);
            // get proxy ticket
            final String proxyTicket = casProxyProfile.getProxyTicketFor(SERVICE_URL);
            return new ModelAndView(new RedirectView(CommonHelper.addParameter(SERVICE_URL, "ticket", proxyTicket)));
        } else {
            // mode proxy
        }
        return null;
    }
View Full Code Here

        String consumerKey = request.getParameter("consumerKey");

        clientManager.removeRegisteredClient(consumerKey);


        ModelAndView modelAndView = new ModelAndView(new RedirectView("/app/listRegisteredClients"));
        return modelAndView;
    }
View Full Code Here

    public ModelAndView revokeAccess(HttpServletRequest request) {
        String consumerKey = request.getParameter("consumerKey");
       
        clientManager.removeAllTokens(consumerKey);

        ModelAndView modelAndView = new ModelAndView(new RedirectView("/app/listAuthorizedClients"));
        return modelAndView;
    }
View Full Code Here

    return "/main/login";
  }
 
  @RequestMapping("success")
  public ModelAndView loginSuccess() {
    return new ModelAndView(new RedirectView("/cpqa/project"));
  }
View Full Code Here

    return "/main/login";
  }
 
  @RequestMapping("/main")
  public ModelAndView mainPage(Model model) {
    return new ModelAndView(new RedirectView("/cpqa/project"));
  }
View Full Code Here

     *            the user
     * @return the string
     */
    @RequestMapping(value = UserController.TO_LOGIN, method = RequestMethod.POST)
    public ModelAndView authentication(@ModelAttribute(UserController.USER) final User user) {
        final RedirectView redirection = new RedirectView(UserController.LOGIN_VIEW);
        if (this.userService.authenticate(this.user)) {
            redirection.setUrl(FlightSearchController.FLIGHT_SEARCH_VIEW);
        }
        return new ModelAndView(redirection);
    }
View Full Code Here

    if (request.getParameter("Submit Query") != null) {
      if (criterias.size() == 0) {
        request.setAttribute("messages", getMessageSourceAccessor().getMessage("search.no.criteria.selected"));
        return showForm(request, response, errors);
      }
      return new ModelAndView(new RedirectView("searchStudyList.html"));
    } else if (request.getParameter("Modify Query") != null) {
      return new ModelAndView(new RedirectView("searchForm.html"));
    }
    return new ModelAndView(getSuccessView());
  }
View Full Code Here

  }

  @ExceptionHandler(FunctionalException.class)
  public RedirectView handleException4(FunctionalException ex, HttpServletRequest request) throws IOException
  {
    RedirectView redirectView = new RedirectView("../errorRedirectPage");
    redirectView.addStaticAttribute("errorMessage", ex.getMessage());
    return redirectView;
  }
View Full Code Here

        sessionStatus.setComplete();
        throw new InvalidRequestException("Cannot approve request when no redirect URI is provided.");
      }

      if (!authorizationRequest.isApproved()) {
        return new RedirectView(getUnsuccessfulRedirect(authorizationRequest,
            new UserDeniedAuthorizationException("User denied access"), responseTypes.contains("token")),
            false, true, false);
      }

      if (responseTypes.contains("token")) {
View Full Code Here

TOP

Related Classes of org.springframework.web.servlet.view.RedirectView

Copyright © 2018 www.massapicom. 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.