In last few hours I\'ve read a lot concerning this topic, and so far nothing has worked. I\'m trying to return response containing \"odd\" some characters. Here is example o
My simple solution:
@RequestMapping(value="test")
public ModelAndView test(){
String test = "čćžđš";
...
ModelAndView mav = new ModelAndView("html_utf8");
mav.addObject("responseBody", test);
}
and the view html_utf8.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>${responseBody}
No additional classes and configuration.
And You can also create another view (for example json_utf8) for other content type.