In Spring MVC @RequestMapping annotation, I am returning JSP page name as result. This returns HTTP status code 200 OK. How can I change this status code to something like 201 created ?
@ResponseStatus doesn't work. Also, HttpServletResponse won't work since I need to return my custom JSP page only.
@RequestMapping(method = RequestMethod.POST)
public String addPhone(@ModelAttribute("phone") Phone phoneVO) {
phoneManager.addPhone(phoneVO);
return "redirect:/phone";
}