今天做form表单提交时,用get方式提交.在IE浏览器下显示下载该action访问的后台java类.而在其他内核的浏览器下都正常运行.
//处理中文乱码问题,指明内容请求输入的格式是什么
response.setContentType("text/html,charset=utf-8");
//指明输出流的编码格式
response.setCharacterEncoding("utf-8");
在ie中不支持这种写法
response.setContentType("text/html,charset=utf-8");
这种写法.故将
charset=utf-8去掉即可
转载于:https://blog.51cto.com/tlyspa/1614940