@RequestMapping("/fileDownload.do") public void fileDownload(RMap rmap, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws IOException { UMap umap = commonService.selectAttachFile(rmap, model); String filename = (String) umap.get("original_file_name"); String fileNm = new String(filename.getBytes("UTF-8"), "ISO-8859-1"); response.setContentType("application/octet-stream"); response.setHeader("Content-Disposition", "attachment;filename=" + fileNm); byte[] data = (byte[]) umap.get("file"); response.getOutputStream().write(data); }