Example usage for org.springframework.web.servlet ModelAndView ModelAndView

List of usage examples for org.springframework.web.servlet ModelAndView ModelAndView

Introduction

In this page you can find the example usage for org.springframework.web.servlet ModelAndView ModelAndView.

Prototype

public ModelAndView(View view) 

Source Link

Document

Convenient constructor when there is no model data to expose.

Usage

From source file:com.banco.controller.HomeController.java

@RequestMapping(value = "/")
public ModelAndView index() {
    return new ModelAndView("redirect:/HB/index");
}

From source file:org.freeeed.search.web.controller.MainPageController.java

@Override
public ModelAndView execute() {
    return new ModelAndView(WebConstants.MAIN_PAGE);
}

From source file:com.orca.web.LicenseController.java

@RequestMapping(value = "license.html")
public ModelAndView license(@RequestParam("surveyId") Integer surveyId) {
    Survey survey = surveyService.getSurvey(surveyId);
    if (!surveyService.authorizedUser(survey)) {
        return new ModelAndView("notAuthorized");
    }/* w w w .  j a  v a2 s .  c o m*/
    ModelAndView mav = new ModelAndView("license");
    mav.addObject("license", survey.getLicense());
    mav.addObject("survey", survey);
    return mav;
}

From source file:uk.org.funcube.fcdw.controller.WodController.java

@RequestMapping(value = "", method = RequestMethod.GET)
public ModelAndView getFuncube() {
    ModelAndView model = new ModelAndView("wod");
    model.addObject("satelliteId", "2");
    return model;
}

From source file:controller.PswdforgottenController.java

@Override
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {

    logger.info("Returning pswd forgotten view");

    return new ModelAndView("pswdforgotten");
}

From source file:com.test1.controller.ProfileController.java

@RequestMapping(value = "/profile")
public ModelAndView profile(@ModelAttribute("userId") int userId) {
    ModelAndView mav = new ModelAndView("profile");
    try {/*  w  w  w .ja va2  s.c  o m*/
        UserDAO userDao = new UserDAO();
        UserBean user = userDao.getUser(userId);
        mav.addObject("username", user.getUsername());
        mav.addObject("password", user.getPassword());
    } catch (Exception ex) {
    }
    return mav;
}

From source file:uk.org.funcube.fcdw.controller.HiresController.java

@RequestMapping(value = "", method = RequestMethod.GET)
public ModelAndView getFuncube() {
    ModelAndView model = new ModelAndView("hires");
    model.addObject("satelliteId", "2");
    return model;
}

From source file:com.neupane.springJDBC.controller.CustomerControler.java

@RequestMapping(method = RequestMethod.GET)
public ModelAndView index() throws ClassNotFoundException, SQLException {
    ModelAndView mv = new ModelAndView("index");
    try {/*from   w  w  w  .  j a va 2  s . c o  m*/
        mv.addObject("customer", customerDAO.getAll());
    } catch (SQLException sql) {
        System.out.println(sql.getMessage());
    }
    return mv;
}

From source file:uk.org.funcube.fcdw.controller.RealtimeController.java

@RequestMapping(value = "", method = RequestMethod.GET)
public ModelAndView getFuncube() {
    ModelAndView model = new ModelAndView("realtime");
    model.addObject("satelliteId", "2");
    return model;
}

From source file:info.lejin.raphael.controller.FrontController.java

@RequestMapping(method = RequestMethod.GET, path = "admin/home")
public ModelAndView getUsers() {
    ModelAndView view = new ModelAndView("admin/index");
    List<User> userlist = userDao.list();
    userlist.forEach(user -> System.out.println(user.getUsername()));
    view.addObject("users", userlist);
    return view;/*from   w  w  w . j ava 2  s.  c  o  m*/
}