sitelink1 https://blog.naver.com/dmswn11kr/221075081694 
sitelink2  
sitelink3  
sitelink4  
sitelink5  
sitelink6  

Content-disposition
: 컨텐트 타입의 옵션
: 지정된 파일명을 지정함으로써 더 자세한 파일의 속성을 알려줄 수 있다.

- inline
: 브라우저 인식 파일확장자를 가진 파일들에 대해서는 웹브라우저 상에서 바로 파일을 자동으로 보여줄 수 있어서 의미상인 멀티파트 마시지를 포현
: 그외의 파일들에 대해서는 '파일다운로드' 대화상자가 뜨도록 하는 해더속성

- attachment
: 브라우저 인식 파일확장자를 포함하여 모든 확장자의 파일들에 대해, 다운로드 시 무조건 '파일다운로드' 대화상자가 뜨도록 하는 해더속성


ex)

if (strClient.indexOf("MSIE 5.5") > -1) { // MS IE 5.5 이하
    fileName = URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "\\ ");
    response.setHeader("Content-Disposition", "filename=" + fileName  + ".xls;");
} else if (strClient.indexOf("MSIE") > -1) { // MS IE (보통은 6.x 이상 가정)
    fileName = java.net.URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "\\ ");
    response.setHeader("Content-Disposition", "attachment; filename=" + fileName  + ".xls;");
} else if (strClient.indexOf("Trident") > -1) { // MS IE 11
    fileName = java.net.URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "\\ ");
    response.setHeader("Content-Disposition", "attachment; filename=" + fileName + ".xls;");
} else { // 모질라, 오페라
    fileName = new String(fileName.getBytes("euc-kr"), "latin1").replaceAll("\\+", "\\ ");
    response.setHeader("Content-Disposition", "attachment; filename=" + fileName  + ".xls;");
}

번호 제목 글쓴이 날짜 조회 수
283 수치 데이터 처리 유틸리티 file 황제낙엽 2019.05.12 1929
282 한글 초성 중성 종성 분리 유틸리티(자작) file 황제낙엽 2019.05.07 539
281 한글 초성 중성 종성 분리 (자모분리) 황제낙엽 2019.05.07 475
280 한글 인코딩의 이해 1편: 한글 인코딩의 역사와 유니코드 황제낙엽 2019.05.07 513
279 한글 인코딩의 이해 2편: 유니코드와 Java를 이용한 한글 처리 file 황제낙엽 2019.05.07 521
» 응답 헤더의 Content-disposition 속성 황제낙엽 2019.04.16 833
277 StringUtils - 문자열 처리 유틸리티 file 황제낙엽 2019.04.15 531
276 JSON과 GSON 황제낙엽 2019.03.24 612
275 File.length() 에 대하여 황제낙엽 2019.03.24 539
274 File.delete() 와 File.deleteOnExit() 황제낙엽 2019.03.24 2614
273 List to Array / Array to List 황제낙엽 2019.03.24 424
272 Oracle JAVA 유료화에 관련한 최신 기사 황제낙엽 2019.01.23 488
271 [HttpURLConnection, HttpsURLConnection] 코드참조용 샘플프로젝트 secret 황제낙엽 2019.01.18 0
270 Iterator.next() - NoSuchElementException 황제낙엽 2018.10.28 648
269 OracleJDK 유료화 FAQ (Oracle Java 의 유료화에 대한 어느분의 정리) 황제낙엽 2018.10.11 505
268 메일서버(daum.net)에 POP3를 이용하여 메일 가져오기 예제 file 황제낙엽 2018.10.09 1331
267 Sending mail through Java using SMTP of gmail file 황제낙엽 2018.09.13 894
266 Read or get mails using pop in java (using gmail) file 황제낙엽 2018.09.13 11679
265 Collections.sort() , Comparator 황제낙엽 2018.08.23 571
264 JavaMail - Connecting Gmail pop3 server. 황제낙엽 2018.08.20 792