Example usage for org.springframework.web.bind.annotation RequestMethod GET

List of usage examples for org.springframework.web.bind.annotation RequestMethod GET

Introduction

In this page you can find the example usage for org.springframework.web.bind.annotation RequestMethod GET.

Prototype

RequestMethod GET

To view the source code for org.springframework.web.bind.annotation RequestMethod GET.

Click Source Link

Usage

From source file:com.healthcit.analytics.servlet.LoginController.java

@RequestMapping(method = RequestMethod.GET)
public String handleLogin(@RequestParam("err") Integer err, Model model) {
    if (err != null) {
        switch (err) {
        case 1:/*  www  .  j a  va2s  .co m*/
            model.addAttribute("errorMessage", "Invalid login/password. Please try again.");
            break;
        case 2:
            model.addAttribute("errorMessage",
                    "You have no permissions to accsess required page. Please login with another user.");
            break;
        }
    }
    return "/../login";
}

From source file:com.wury.app.controller.AuthorController.java

@RequestMapping(value = "/my-posts", method = RequestMethod.GET)
public ModelAndView myPost() {
    ModelAndView mav = new ModelAndView("author/my_posts");
    return mav;/*from   ww w. j av  a  2 s . c o m*/
}

From source file:edu.uoc.common.controller.NavigationController.java

@RequestMapping(value = { "/", "index" }, method = RequestMethod.GET)
public ModelAndView homePage() {
    return new ModelAndView("index");
}

From source file:com.leapfrog.academyspring.controller.HomeController.java

@RequestMapping(method = RequestMethod.GET)
public String index() {
    return "academyreception";
}

From source file:com.hackathon.controller.HelloWorld.java

@RequestMapping(value = "/hello", method = RequestMethod.GET)
public String hello(@RequestParam(value = "name", required = false, defaultValue = "World") String name,
        Model model) {//from ww  w. jav a 2  s .c o  m
    model.addAttribute("name", name);
    return "helloworld";
}

From source file:controllers.GreetingController.java

@RequestMapping(value = "/greeting", method = RequestMethod.GET)
public String printHello(@RequestParam(value = "name", required = false, defaultValue = "User") String name,
        ModelMap model) {/*from  w  ww.jav  a 2  s . c om*/
    model.addAttribute("message", name + " Spring Hello World!!!!");
    return "Greeting";
}

From source file:com.srinathavan.mwbng.rest.mvc.WebIndexController.java

@RequestMapping(value = { "/", "/index", "/client" }, method = RequestMethod.GET)
public String index() {
    /*return "view";*/
    return "redirect:/client/index.html";
}

From source file:com.dub.skoolie.web.controller.system.courses.SystemSchoolClassController.java

@RequestMapping(value = "/system/schoolclasses", method = RequestMethod.GET)
public ModelAndView getSchoolClasses() {
    return new ModelAndView("test");
}

From source file:com.flamenco.examenmensito.Controlador.java

@RequestMapping(value = "/mensaje", method = RequestMethod.GET, headers = { "Accept=text/html" })
public @ResponseBody String algo() {
    String facil = "Mensajito ";
    return facil;
}

From source file:com.gym.controller.EjercicioController.java

@RequestMapping(value = "/ejercicios", method = RequestMethod.GET)
public String showIndex(Map<String, Object> map) {
    map.put("ejercicio", new Ejercicio());
    return "index";
}