I need response html,encoding with utf-8. so i added the "produces = "text/html;charset=UTF-8" to @RequestMapping.but respose it's not correctly! Anyone can helps me?
the code:
PS:Code:@RequestMapping(value="banner.html",produces = "text/html;charset=UTF-8") @ResponseBody public String banner() { //this.template=new FreeMarkerTemplate(context); //this.company=companyService.getCompany(1); Map<Object , Object> model = new HashMap<Object,Object>(); model.put("logo", this.company.getCmpLogo()); model.put("banner1", this.company.getBanner1()); model.put("banner2", this.company.getBanner2()); return this.template.processTemplate(tpl_banner, model); }
if i changed it to @RequestMapping(value="banner",produces = "text/plain;charset=UTF-8"),it's reponse correctly!
but the result is plain text,i need html.


Reply With Quote
