Issue
I have a spring action that I am rendering some json from the controller, at the minute its returning the content type 'text/plain;charset=ISO-8859-1'.
How can I change this to be 'application/json'?
Solution
Pass the HttpServletResponse
to your action method and set the content type there:
public String yourAction(HttpServletResponse response) {
response.setContentType("application/json");
}
Answered By - Bozho