List of usage examples for org.springframework.web.bind.annotation RequestMethod POST
RequestMethod POST
To view the source code for org.springframework.web.bind.annotation RequestMethod POST.
Click Source Link
From source file:com.opencnc.controllers.TipoCodigoController.java
@RequestMapping(method = RequestMethod.POST) public void crear() { }
From source file:controllers.clientesController.java
@RequestMapping(value = "/clientesCRUD_registrar.htm", method = RequestMethod.POST) public String registrar(@RequestParam("cedula") String cedula, @RequestParam("nombre") String nombre, @RequestParam("apellido") String apellido, @RequestParam("telefono") String telefono, @RequestParam("correo") String correo, Model model) { ClientesDAO clienteDAO = new ClientesDAO(); clienteDAO.ingresarCliente(cedula, nombre, apellido, telefono, correo); model.addAttribute("clientes", clienteDAO.obtenerClientes()); return "clientes"; }
From source file:com.xinferin.controller.LicencesController.java
@RequestMapping(value = "/get", method = RequestMethod.POST, consumes = "application/json") @ResponseStatus(HttpStatus.OK)// w ww.j a v a 2 s . co m public LicenceReply get(@RequestBody KeyRequest keyRequest) { return daoLicence.get(keyRequest); }
From source file:controllers.empleadosController.java
@RequestMapping(value = "/empleadosCRUD_registrar.htm", method = RequestMethod.POST) public String registrar(@RequestParam("cedula") String cedula, @RequestParam("nombre") String nombre, @RequestParam("apellido") String apellido, @RequestParam("telefono") String telefono, @RequestParam("correo") String correo, @RequestParam("hoja_vida") String HV, Model model) { EmpleadosDAO empleadoDAO = new EmpleadosDAO(); empleadoDAO.ingresarEmpleado(cedula, nombre, apellido, telefono, correo, HV); model.addAttribute("empleados", empleadoDAO.obtenerEmpleados()); return "empleados"; }
From source file:controller.book.SearchCtr.java
@RequestMapping(value = "/search", method = RequestMethod.POST) public @ResponseBody ArrayList<Book> search(@RequestParam("vl") String value) { if (value != null && !value.equals("")) { try {/*from ww w.j a va 2 s .c o m*/ String name = MyTool.handleInputString(value); ArrayList<Book> listBook = new BookDAO().getListOfBookByName(name); if (listBook != null) { return listBook; } } catch (Exception e) { e.printStackTrace(); } } return null; }
From source file:proyectoFinal.ControladorTarjeta.java
@RequestMapping(value = "/tarjeta/[nombre}/{fechaCorte}", method = RequestMethod.POST, headers = { "Accept=text/htm" }) @ResponseBody/*from w w w .ja v a 2 s .c om*/ String guardarTarjeta(@PathVariable String nombre, @PathVariable Integer fechaCorte) throws Exception { Tarjeta t = new Tarjeta(); t.setDiacorte(fechaCorte); t.setNombre(nombre); DAOTarjeta dao = new DAOTarjeta(); dao.guardar(t); return "Tarjeta guardada clon exito"; }
From source file:com.faces.controller.CaptureController.java
@RequestMapping(value = "/set/rollnumber", method = RequestMethod.POST) public ModelAndView setRollnumber(HttpServletRequest request) { String roll = request.getParameter("tbRollNumber"); System.out.println("....................rollNumber = " + roll); mav = new ModelAndView("upload"); return mav;//from ww w .j ava 2 s. co m }
From source file:com.sapito.controller.MainController.java
@RequestMapping(value = "loginIndex", method = RequestMethod.POST) public String login(Model model, String username, String password) { System.out.println(username); System.out.println(password); boolean b = true; if ("VENTAS".equals(username)) { return "redirect:ventas"; }/*w w w. j a v a 2 s . c o m*/ if ("RH".equals(username)) { return "redirect:recursoshumanos"; } if ("INVENTARIOS".equals(username)) { return "redirect:inventarios"; } if ("CONTABILIDAD".equals(username)) { return "redirect:contabilidad"; } if ("COMPRAS".equals(username)) { return "redirect:compras"; } if ("ACTIVOFIJO".equals(username)) { return "redirect:activofijo"; } if ("DIRECCION".equals(username)) { return "redirect:direccion"; } if ("OPERACIONES".equals(username)) { return "redirect:operaciones"; } else { String error = "<br><div class='alert alert-danger' role='alert'>Usuario no encontrado</div>"; model.addAttribute("NotFound", error); return "sapoindex"; } }
From source file:com.xinferin.controller.CustomerController.java
@RequestMapping(value = "/add", method = RequestMethod.POST, consumes = "application/json") @ResponseStatus(HttpStatus.CREATED)//from ww w. j av a2 s .c o m public void addCustomer(@RequestBody Customer customer) { daoCustomer.add(customer); }
From source file:com.test1.controller.LoginController.java
@RequestMapping(value = "/loginSubmit", method = RequestMethod.POST) public ModelAndView login(@RequestParam("username") String username, @RequestParam("password") String password) { ModelAndView mav = new ModelAndView("redirect:home"); mav.addObject("username", username); mav.addObject("password", password); return mav;// w w w. j av a 2 s . com }