Search code examples
ajaxjsoninternet-explorerparse-error

Internet Explorer and JSON


I'm having a strange behavior with IE. In development environment the JSON calls work perfectly, while in production they fail due to "parsererror" even with a status code of 200. I've seen other messages here in stackoverflow, but I'm posting since I have this different behaviours between two environments.

DEV Environment: Ubuntu / Tomcat 6.026

Prod environment: Win 2003 server / Tomcat 6.0.33


Solution

  • I solved by adding content-type and charset to the @RequestMapping annotation

    @RequestMapping(value = "/paged", method = RequestMethod.GET, produces="application/json; charset=utf-8")