@GetMapping("/to_update_car{id}") public String UpdateCar(@PathVariable("id")String id, HttpSession session){ Car now=cardao.FindById(id); System.out.println(now); System.out.println(id); session.setAttribute("update_car_pojo",id); return "redirect:/car_update"; }
<input name="car_id" type="text" class="form-control" id="exampleInputName2" th:value="${session.update_car_pojo}" >