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

번호 제목 글쓴이 날짜 조회 수
43 세션의 timeout 설정 >> HttpSession.setMaxInactiveInterval() 황제낙엽 2019.07.03 8649
42 jQuery JSON 데이터 통신의 특성 (HttpServletRequest) 황제낙엽 2019.06.23 581
41 [HttpURLConnection] 서버와의 통신 시도 시점 관련 황제낙엽 2019.06.23 650
» 응답 헤더의 Content-disposition 속성 황제낙엽 2019.04.16 902
39 Java에서 User-Agent 파써 사용하기 황제낙엽 2017.11.20 843
38 서버구동시 주기적으로 동작을 수행하는 스레드를 함께 실행하는 서블릿 황제낙엽 2017.08.02 551
37 JSP 파일에서 getOutputStream() has already been called for this response 에러 황제낙엽 2013.04.24 11974
36 [The type HttpUtils is deprecated] javax.servlet.http.HttpUtils 황제낙엽 2013.03.20 628
35 Java에서 URL 다루기 file 황제낙엽 2012.06.24 454
34 HttpServletResponse.setContentType(java.lang.String type) 과 MIME 타입 황제낙엽 2012.04.20 576
33 한글 파일명 깨짐으로 살펴본 다국어 처리 문제 (UTF-8) 황제낙엽 2012.03.22 10508
32 <jsp:include>, include지시자 file 황제낙엽 2011.07.24 498
31 <jsp:include> 액션태그 황제낙엽 2011.07.24 451
30 Servlet의 각종 Listener 사용방법 및 샘플 황제낙엽 2010.10.26 450
29 ServletContext 초기화 및 소멸 황제낙엽 2010.10.26 461
28 ServletConfig 이용하기 황제낙엽 2010.03.15 521
27 Transfer-Encoding: chunked VS Content-Length 황제낙엽 2009.09.17 573
26 서블릿 응답 헤더(Response Header) 황제낙엽 2009.09.17 525
25 MultipartRequest (cos.jar)와 서블릿을 이용한 업로드 file 황제낙엽 2009.06.19 713
24 JSP session 정보 얻기 황제낙엽 2009.01.21 492