Oct 26th, 2009, 03:19 AM
How to set the HTTP status code for JSON responses?
How can i set the HTTP status code for JSON responses when using MappingJacksonJsonView?
I could include the HttpServletResponse to the method parameters like below and set the status code manually in the method but then the MappingJacksonJsonView is skipped totally. No JSON gets rendered at all.
@RequestMapping(value = "/something", method = RequestMethod.POST)
public void createOrUpdate(@RequestParam String param, Model model, HttpServletResponse response) throws Exception
Tags for this Thread