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

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

Introduction

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

Prototype

RequestMethod POST

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

Click Source Link

Usage

From source file:pplabmed.controller.perfilesController.java

@RequestMapping(value = "guardaPerfil.htm", method = RequestMethod.POST)
public ModelAndView guarda(@RequestParam("nombre") String nombre, @RequestParam("desc") String desc,
        @RequestParam("per") String per, @RequestParam("bol") String bol) throws Exception {
    ModelAndView mv = new ModelAndView("cargatempPermisos");
    perfilDAO opc = new perfilDAO();
    String p1 = new String(nombre.getBytes("ISO-8859-1"), "UTF-8");
    String p2 = new String(desc.getBytes("ISO-8859-1"), "UTF-8");

    String idper = opc.guardaPerfil(p1, p2, bol);
    String[] per1 = per.split(",");
    for (int i = 0; i < per1.length; i++) {
        String insertPermiso = opc.guardaPerfilp(Integer.parseInt(per1[i]), Integer.parseInt(idper));
    }//from   w  w  w  .ja  va 2s.c o m

    mv.addObject("resp", "No");
    return mv;
}

From source file:com.example.dfa.demo.mvc.AddNewEmployeeProspect.java

@RequestMapping(method = RequestMethod.POST)
public String addNewEmployeeProspect(@ModelAttribute("employeeProspect") EmployeeProspectDTO newEmployee) {
    dfaDemoService.addNewProspect(newEmployee);
    return "redirect:/findWorkflows.htm";
}

From source file:com.mockCommon.controller.mock.youbi.CarTypeMockController.java

@RequestMapping(value = "/vehicle/input", method = RequestMethod.POST)
@ResponseBody/* w w  w  .ja  v a2s  .co  m*/
public String vehicleInput(@RequestBody Map<String, Object> params) {
    LogConstant.runLog.info("[JiekouInputCarModel]parameter city_code:" + params.get("city_code")
            + ", license_no:" + params.get("license_no") + ", license_owner:" + params.get("license_owner")
            + ", frame_no:" + params.get("frame_no") + ", engine_no:" + params.get("engine_no")
            + ", vehicle_name:" + params.get("vehicle_name") + ", enroll_date:" + params.get("enroll_date")
            + ", seat_count:" + params.get("seat_count"));
    if (params.get("city_code") == null || params.get("license_no") == null
            || params.get("license_owner") == null || params.get("frame_no") == null
            || params.get("engine_no") == null || params.get("vehicle_name") == null
            || params.get("enroll_date") == null || params.get("seat_count") == null) {
        return "??";
    }
    String result = carTypeMockService.vehicleInput(params.get("city_code").toString(),
            params.get("license_no").toString(), params.get("license_owner").toString(),
            params.get("frame_no").toString(), params.get("engine_no").toString(),
            params.get("vehicle_name").toString(), params.get("enroll_date").toString(),
            params.get("seat_count").toString());
    return result;
}

From source file:com.mycompany.doctorapp.controller.SignupController.java

@RequestMapping(value = "/signup", method = RequestMethod.POST)
public String signup(@Valid @ModelAttribute Patient patient) {
    patientService.newPatient(patient);/*from w  w  w.  j av  a2 s.c  om*/
    return "redirect:/login";
}

From source file:escambovirtual.controller.BuscaController.java

@RequestMapping(value = "/web/buscar", method = RequestMethod.POST)
public ModelAndView postBuscar() throws Exception {
    ModelAndView mv = new ModelAndView("");

    return mv;/*from  w w  w .j  a  v  a2  s . c  o  m*/
}

From source file:com.mohit.program.controller.login.AdministratorLogin.java

@RequestMapping(method = RequestMethod.POST)
public String doPost(Admin admin) {
    admin = loginDao.login(admin.getUsername(), admin.getPassword());
    if (admin != null) {
        return "redirect:/display?success";
    }//w w  w. j a v a  2s . c  o m
    return "redirect:/?error";
}

From source file:controle.PessoaControler.java

@RequestMapping(value = "cadastrarPessoa.htm", method = RequestMethod.POST)
public String cadastrarPessoa(@ModelAttribute("usuario") Usuario usuario) {
    UsuarioDao dao = new UsuarioDao();
    dao.cadastrarPessoa(usuario);/*  w ww  .  jav  a 2  s .c  o  m*/
    return "sucesso";
}

From source file:jungle.controller.GenreController.java

@RequestMapping(value = "ajouter", method = RequestMethod.POST)
public String ajouterPOST(@ModelAttribute("genre") Genre g) {

    genreCrudService.save(g);/*from w ww.j a  va 2  s. c o  m*/

    return "redirect:/genre/lister";
}

From source file:controller.book.BookSetCtr.java

@RequestMapping(method = RequestMethod.POST)
public @ResponseBody ArrayList<Book> bookByBookSet(@RequestParam("idBS") String idBS) {
    if (idBS != null) {
        try {/* w ww .  j a va  2  s.c om*/
            int id = Integer.parseInt(idBS);
            if (id >= 0) {
                ArrayList<Book> listBookByBookSet = new BookDAO().getListOfBookByIdBookSet(id);
                if (listBookByBookSet != null) {
                    return listBookByBookSet;
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    return null;
}

From source file:com.mohit.program.controller.disease.DiseaseController.java

@RequestMapping(method = RequestMethod.POST)
public String doPost(Disease disease) {
    diseaseDao.insert(disease);
    return "redirect:/view?success";
}