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;");
}

번호 제목 글쓴이 날짜 조회 수
266 한글 인코딩의 이해 2편: 유니코드와 Java를 이용한 한글 처리 file 황제낙엽 2019.05.07 830
» 응답 헤더의 Content-disposition 속성 황제낙엽 2019.04.16 1047
264 StringUtils - 문자열 처리 유틸리티 file 황제낙엽 2019.04.15 661
263 File.length() 에 대하여 황제낙엽 2019.03.24 909
262 File.delete() 와 File.deleteOnExit() 황제낙엽 2019.03.24 3076
261 List to Array / Array to List 황제낙엽 2019.03.24 576
260 Oracle JAVA 유료화에 관련한 최신 기사 황제낙엽 2019.01.23 642
259 Iterator.next() - NoSuchElementException 황제낙엽 2018.10.28 802
258 OracleJDK 유료화 FAQ (Oracle Java 의 유료화에 대한 어느분의 정리) 황제낙엽 2018.10.11 662
257 메일서버(daum.net)에 POP3를 이용하여 메일 가져오기 예제 file 황제낙엽 2018.10.09 1608
256 Sending mail through Java using SMTP of gmail file 황제낙엽 2018.09.13 1088
255 Read or get mails using pop in java (using gmail) file 황제낙엽 2018.09.13 11924
254 Collections.sort() , Comparator 황제낙엽 2018.08.23 746
253 JavaMail - Connecting Gmail pop3 server. 황제낙엽 2018.08.20 1217
252 JavaMail - 네이버 메일 수신하기(POP3) 황제낙엽 2018.08.20 1793
251 JavaMail - POP3로 메일 읽어오기 - 단순샘플 황제낙엽 2018.08.20 722
250 [HttpURLConnection, HttpsURLConnection] Response 로 받은 데이터가 압축되어 있는 경우(gzip, deflate) 황제낙엽 2018.08.16 891
249 [HttpURLConnection, HttpsURLConnection] 자바 Http / https 의 결과를 주고받을때 세션을 유지 황제낙엽 2018.08.12 803
248 [HttpURLConnection] 자바(Java) URL 접속 및 세션 관리 file 황제낙엽 2018.08.12 778
247 org.apache.commons.io.FilenameUtils (getExtension) 황제낙엽 2018.04.01 1886