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.museum_web.controller.MuseumController.java

@RequestMapping("museum")
public ModelAndView list() {
    ModelAndView mv = new ModelAndView("museum/list");
    ArrayList<Museum> mus = (ArrayList<Museum>) new MuseumService().listMuseum();
    mv.addObject("list", mus);
    return mv;/*from   www. j  a v a 2 s . c  o  m*/
}

From source file:com.opencnc.controllers.CadController.java

@RequestMapping("/cad/cad")
public ModelAndView cadView() {
    ModelAndView m = new ModelAndView("/cad/cad");
    return m;
}

From source file:com.leapfrog.lfaeventmanager.controller.DefaultController.java

@RequestMapping(value = "/", method = RequestMethod.GET)
public ModelAndView eventList() {
    ModelAndView mv = new ModelAndView("index");
    // List<Event> eventLists = eventService.findAll();
    mv.addObject("eventLists", eventService.findAll());
    return mv;//w w  w .j  a  v a  2s.c om
}

From source file:com.anantoni.freshdirect.database_api.LoginController.java

/**
 *
 * @param request//from w  w  w .j a  v a  2 s . c  o m
 * @param response
 * @return
 * @throws Exception
 */
@Override
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
        throws Exception {

    ModelAndView model = new ModelAndView("login");

    return model;
}

From source file:WebApp.Controller.TeacherController.java

@Override
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String requestedUri = request.getRequestURI();

    ModelAndView modelAndView = null;/* www  .  j  a v a 2s  . co  m*/

    if (requestedUri.contains(Constants.INCOURSE_MARK_DISTIBUTION)) {
        modelAndView = new ModelAndView("incourseMarkingScope");
        return modelAndView;
    }

    return modelAndView;
}

From source file:controller.HomeCtr.java

@RequestMapping(value = { "", "/", "home.html" }, method = RequestMethod.GET)
public ModelAndView home(ModelAndView model, HttpSession session, HttpServletRequest request,
        HttpServletResponse response) {/*from   w w w .ja va 2 s.  co m*/
    model = new ModelAndView("/index");
    return model;
}

From source file:my.ctr.MainController.java

@RequestMapping("add.do")
ModelAndView test(String name) {//from   www . j a  v a 2 s . com
    ModelAndView mv = new ModelAndView("testview");
    if (gameService.addTown(name) == false) {
        mv.setViewName("redirect:error.html");
    }
    mv.addObject("lastTown", gameService.getLastTown());
    mv.addObject("gameHistory", gameService.getGameHistory());
    return mv;
}

From source file:com.leapfrog.lfaeventmanager.admin.controller.LoginController.java

@RequestMapping(value = "login", method = RequestMethod.GET)
public ModelAndView displayLogin() {
    ModelAndView mv = new ModelAndView("login/login");
    mv.addObject("userList", userService.getAll());
    return mv;//from  w  w w  .j  av a2 s .  com
}

From source file:kz.controller.VideosController.java

@RequestMapping(value = "/videolesson.htm", method = RequestMethod.GET)
public ModelAndView videolesson(Model model, HttpServletResponse response) throws SQLException {
    ModelAndView mv = new ModelAndView("videolesson");
    return mv;//from  ww w.j a  v  a 2s . co m
}