Package org.springframework.web.servlet.view

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


        } catch (Exception e) {
            request.setAttribute("errorMessage", e.getMessage());
            logger.error(e);
            return new ModelAndView(new InternalResourceView(getFailureViewName() == null ? getViewName() : getFailureViewName()));
        }
        return new ModelAndView(new RedirectView(request.getContextPath() + getViewName()));
    }
View Full Code Here


        } catch (MailException me) {
            log.warn(me.getMessage());
            saveError(request, me.getCause().getLocalizedMessage());
        }

        return new ModelAndView(new RedirectView(request.getContextPath()));
    }
View Full Code Here

        if (viewIdStr != null) {
            // An existing view.
            view = new GraphicalViewDao().getView(Integer.parseInt(viewIdStr));
            if (view == null)
                // Doesn't exist. Redirect back to the views page.
                return new RedirectView("/views.shtm");

            GraphicalViewsCommon.ensureViewEditPermission(user, view);

            if ("true".equals(request.getParameter("copy"))) {
                // Make a copy
View Full Code Here

  public ModelAndView logout(HttpServletRequest request, HttpServletResponse response) {
    HttpSession session = request.getSession();
    session.invalidate();
    SecurityContextHolder.setContext(null);
    return new ModelAndView(new RedirectView("/index.jsp", true));
  }
View Full Code Here

      Recipe r = (Recipe) command;
      recipeManager.saveRecipe(r);
   
      System.out.println("Saving recipe: " + r.getTitle());
     
    RedirectView view = new RedirectView(getSuccessView());
    view.addStaticAttribute(RECIPE_ID_ATTRIBUTE, Long.valueOf(recipeManager.getId(r)));
   
    System.out.println("Save recipe successfully. id=" + Long.valueOf(recipeManager.getId(r)));
    System.out.println(recipeManager.getAllRecipes().size() + " recipes saved.");
   
    return new ModelAndView(view);
View Full Code Here

  }

  protected ModelAndView onSubmit(Object command) throws Exception {
    Document document = (Document) command;
    this.workflow.uploadDocument(document);
    return new ModelAndView(new RedirectView("../status"));
  }
View Full Code Here

    this.workflow = workflow;
  }

  protected ModelAndView onSubmit(Object command) throws Exception {
    this.workflow.passBack((Comment) command);
    return new ModelAndView(new RedirectView("../status"));
  }
View Full Code Here

            html.getSession()
                .withBoolean("authenticated", true)
                .withString("user", enteredUser);
        }
       
        return new ModelAndView(new RedirectView("index.html"));
    }
View Full Code Here

  public ModelAndView login(String username, String password) {
    ModelAndView mav = new ModelAndView("index");
    boolean loginResult = MySecurityManager.login(username, password);
    if (!loginResult) {
      log.debug("登陆失败");
      mav.setView(new RedirectView("unauthorized"));
    }
    return mav;
  }
View Full Code Here

                .setRedirectURI(oauthParams.getRedirectUri())
                .setResponseType(ResponseType.CODE.toString())
                .setScope(oauthParams.getScope())
                .buildQueryMessage();

            return new ModelAndView(new RedirectView(request.getLocationUri()));

        } catch (ApplicationException e) {
            oauthParams.setErrorMessage(e.getMessage());
            return new ModelAndView("get_authz");
        }
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.