response设置content-type 根据后缀的不同设置,如html:response.setContentType("text/html; charset=utf-8"); 详情: 点击打开链接