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.torno.base.controller.HomeController.java
@RequestMapping(value = "/loginusuario", method = RequestMethod.POST) public @ResponseBody UsuarioEntity loginUsuario(@RequestBody UsuarioEntity usuarioEntity) { usuarioService.loginUsuario(usuarioEntity); return usuarioEntity; }
From source file:org.starfishrespect.myconsumption.server.business.controllers.NotifController.java
@RequestMapping(value = "/{name}/id/{registerId}", method = RequestMethod.POST) public SimpleResponseDTO registerId(Principal principal, @PathVariable String name, @PathVariable String registerId) throws DaoException { // Check if this user can access this resource if (!(principal.getName().equals(name))) return new SimpleResponseDTO(false, "you are not allowed to modify this user"); User user = mUserRepository.getUser(name); if (user == null) throw new NotFoundException(); if (registerId == null || registerId.isEmpty()) return new SimpleResponseDTO(false, "Register id invalid"); // Set or override current id user.setRegisterId(registerId);//from w w w . java 2s . c o m mUserRepository.updateUser(user); return new SimpleResponseDTO(true, "Register id associated to the user"); }
From source file:org.terasoluna.gfw.functionaltest.app.transactiontoken.TransactionTokenFlow6Controller.java
@RequestMapping(value = "flow6", method = RequestMethod.POST, params = "confirm") @TransactionTokenCheck(type = TransactionTokenType.BEGIN) public String flow6Step2() { return "transactiontoken/transactionTokenDisplayStart"; }
From source file:za.co.dwarfsun.jcmanager.presentation.rest.JobCardAttributeRestController.java
@RequestMapping(value = "create", method = RequestMethod.POST) @ResponseBody//from w w w . j a v a2s.c o m public String create(@RequestBody JobCardAttribute jobCardAttribute) { jobCardAttributeService.persist(jobCardAttribute); return "JobCardAttribute: " + jobCardAttribute.getId() + " created..."; }
From source file:controlador.LeerFonos.java
@RequestMapping(method = RequestMethod.POST) public String mostrarAlumno(@RequestParam("txtRut") String rut, //resivo el rut Model model, HttpServletRequest request) { //trabajar con secciones http... //modelo para pasar del controlador a la vista if (rut.trim().equals("")) {//si rut esta vacio return "buscar"; }/*from w w w . ja v a2 s . c om*/ Alumno a = dao.readByRutJPQL(rut);//leo el alumno y lo alamceno en a if (a == null) { return "error"; } //request.getSession().setAttribute("alumno", a); model.addAttribute("listaFonos", a.getFonoCollection()); return "fonos"; }
From source file:org.runway.web.controllers.ErrorController.java
@RequestMapping(method = { RequestMethod.GET, RequestMethod.POST }) public String displayPage(HttpServletRequest request) { return VIEW_NAME; }
From source file:WebControllers.WebControllerUsuarios.java
@RequestMapping(value = "registro", method = RequestMethod.POST) public ModelAndView serviceRegistro(HttpServletRequest request) { ModelAndView result = new ModelAndView("paginasRestaurante/registro"); cargaContenidoComun(request, result); String nombre = getParametroString("nombre", request); String direccion = getParametroString("direccion", request); String telefono = getParametroString("telefono", request); String email = getParametroString("email", request); String username = getParametroString("username", request); String web = getParametroString("web", request); String password = getParametroString("password", request); String cfpassword = getParametroString("cfpassword", request); Restaurante restaurante = new Restaurante(); restaurante.setNombre(nombre);//from w ww. j a v a2s . c o m restaurante.setDireccion(direccion); restaurante.setTelefono(telefono); restaurante.setUsername(username); restaurante.setWeb(web); restaurante.setEmail(email); restaurante.setPassword(password); restaurante.setCfpassword(cfpassword); if (gUsuarios.checkDataUsuario(restaurante)) { gUsuarios.registraUsuario(restaurante); } return result; }
From source file:za.co.dwarfsun.jcmanager.presentation.rest.ClientRestController.java
@RequestMapping(value = "create", method = RequestMethod.POST) @ResponseBody//from www .j a va 2 s.com public String create(@RequestBody Client client) { clientService.persist(client); return "Client: " + client.getName() + " created..."; }
From source file:com.kalai.controller.HomeController.java
@RequestMapping(value = "/home", method = RequestMethod.POST) public String homepage(ModelMap map, @ModelAttribute("loginform") loginusers loginusers, HttpSession session) { session.setAttribute("username", loginusers.getEmail()); session.setAttribute("password", loginusers.getPassword()); String username = (String) session.getAttribute("username"); if (!username.equals("") && username.trim().length() != 0) { map.addAttribute("msg", "Hai this is home page using Spring and Hibernate" + loginusers.getEmail()); return "Home"; } else {//from w ww . java 2 s . co m return "PageNotFound"; } }
From source file:pplabmed.controller.CatCitologiaController.java
@RequestMapping(value = "idCito.htm", method = RequestMethod.POST) public String InsertNuevaCatCitologia(Model m, HttpServletRequest request, @RequestParam("NombreCatCitologia") String nomp, @RequestParam("Estado") String estado) { CatCitoDAO catcitologia = new CatCitoDAO(); boolean estadoU = true; if (estado.equals("Inactivo")) estadoU = false;//from w ww .j a v a 2 s .c om catcitologia.AgregarCatCito(nomp, estadoU, 0, ""); return "principal"; }