日期:2014-05-16  浏览次数:20334 次

jsp下载附件文件名乱码解决

       String contentType = ...;
       try {
			filename = MimeUtility.encodeText(filename, "UTF-8", "B");
		} catch (UnsupportedEncodingException e) {
			// ingore
		}

response.setContentType(contentType);
			response.setHeader("Content-disposition","attachment; filename=" + filename);