-
Oct 26th, 2009, 03:19 AM
#1
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)
@ResponseBody
public void createOrUpdate(@RequestParam String param, Model model, HttpServletResponse response) throws Exception
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules