日期:2014-05-18 浏览次数:20857 次
//火狐
if (request.getHeader("User-Agent").toLowerCase().indexOf("firefox") > 0) {
fileNameTemp = new String(fileNameTemp.getBytes("UTF-8"), "ISO8859-1");
}
//IE
else if (request.getHeader("User-Agent").toUpperCase().indexOf("MSIE") > 0){
fileNameTemp = URLEncoder.encode(fileNameTemp, "UTF-8");
}
response.setHeader("Content-Disposition", "attachment;filename=\""+fileNameTemp+"\"");