디시인사이드 갤러리

갤러리 이슈박스, 최근방문 갤러리

갤러리 본문 영역

질문] jsp에서 hwp파일 다운로드시 내용깨집니다

usoo0갤로그로 이동합니다. 2010.03.02 14:58:52
조회 1288 추천 0 댓글 65

ftp상에 파일 다운받아보니 정상적으로 한글문서가 열립니다
구현한 jsp download.jsp페이지로 다운로드 해보니
한글문서를 열수가 없었습니다

추가로 jpg, doc, txt파일등을 실험해보았으나
모두 다운잘되고 실행이 잘되었습니다

왜 hwp는 깨져나올까요..

문제의 download.jsp 입니다

<%@ page contentType="text/html; charset=EUC-KR" %>
<%@ page import="java.io.*,java.text.*,java.util.*"%>
<%@ page import="com.ndf.frame.*" %>
<%@ page import="com.ndf.NdfConfigInitializer"%>
<%
NdfProc CommonProc= (NdfProc)request.getAttribute("ndf.NdfProc");
String FILE_NAME = request.getParameter("FILE_NAME");
String FILE = request.getParameter("FILE");
response.setContentType("application/octet-stream");

String path = "/portalfiles/epcts";


File file = new File(path + FILE);
if(file.exists()){
String file_name2 = FILE_NAME;////new String(FILE.getBytes("euc-kr"),"8859_1");
response.setHeader("Content-Disposition","attachment; filename="+file_name2);//톰캣용
response.setHeader("Content-Type",getMime(FILE.substring(FILE.lastIndexOf(".")+1,FILE.length())));

 BufferedInputStream input = null;
 BufferedOutputStream output = null;


 
input = new BufferedInputStream( new FileInputStream(file) );
  byte buffer[] = new byte[1024];
  int len = 0;
  output = new BufferedOutputStream(response.getOutputStream());
  while((len = input.read(buffer)) > 0 ){
   output.write(buffer,0,len);
  }
  out.clear();
  out=pageContext.pushBody();
} else {%>
< language=>
 alert("<%=FILE_NAME%>" + "파일이 존재하지 않습니다.\\n\\n 관리자에게 문의해 주세요.");
 history.go(-1);
</>
<%}%>


<%!
public String getMime(String args)
{
System.out.println(args);
 String sRtn = "application/octet-stream";
 String lower = args.toLowerCase();

 if("3dm".equals(lower)){sRtn="x-world/x-3dmf";}
 else if("3dmf".equals(lower)){sRtn="x-world/x-3dmf";}
 else if("a".equals(lower)){sRtn="application/octet-stream";}
 else if("aab".equals(lower)){sRtn="application/x-authorware-bin";}
 else if("aam".equals(lower)){sRtn="application/x-authorware-map";}
 else if("aas".equals(lower)){sRtn="application/x-authorware-seg";}
 else if("abc".equals(lower)){sRtn="text/vnd.abc";}
 else if("acgi".equals(lower)){sRtn="text/html";}
 else if("afl".equals(lower)){sRtn="video/animaflex";}
 else if("ai".equals(lower)){sRtn="application/post";}
 else if("aif".equals(lower)){sRtn="audio/aiff";}
 else if("aifc".equals(lower)){sRtn="audio/aiff";}
 else if("aiff".equals(lower)){sRtn="audio/x-aiff";}
 else if("aim".equals(lower)){sRtn="application/x-aim";}
 else if("aip".equals(lower)){sRtn="text/x-audiosoft-intra";}
 else if("ani".equals(lower)){sRtn="application/x-navi-animation";}
 else if("aos".equals(lower)){sRtn="application/x-nokia-9000-communicator-add-on-software";}
 else if("aps".equals(lower)){sRtn="application/mime";}
 else if("arc".equals(lower)){sRtn="application/octet-stream";}
 else if("arj".equals(lower)){sRtn="application/arj";}
 else if("art".equals(lower)){sRtn="image/x-jg";}
 else if("asf".equals(lower)){sRtn="video/x-ms-asf";}
 else if("asm".equals(lower)){sRtn="text/x-asm";}
 else if("asp".equals(lower)){sRtn="text/asp";}
 else if("asx".equals(lower)){sRtn="video/x-ms-asf";}
 else if("au".equals(lower)){sRtn="audio/x-au";}
 else if("avi".equals(lower)){sRtn="video/x-msvideo";}
 else if("avs".equals(lower)){sRtn="video/avs-video";}
 else if("bcpio".equals(lower)){sRtn="application/x-bcpio";}
 else if("bin".equals(lower)){sRtn="application/octet-stream";}
 else if("bm".equals(lower)){sRtn="image/bmp";}
 else if("bmp".equals(lower)){sRtn="image/bmp";}
 else if("boo".equals(lower)){sRtn="application/book";}
 else if("book".equals(lower)){sRtn="application/book";}
 else if("boz".equals(lower)){sRtn="application/x-bzip2";}
 else if("bsh".equals(lower)){sRtn="application/x-bsh";}
 else if("bz".equals(lower)){sRtn="application/x-bzip";}
 else if("bz2".equals(lower)){sRtn="application/x-bzip2";}
 else if("c".equals(lower)){sRtn="text/plain";}
 else if("c++".equals(lower)){sRtn="text/plain";}
 else if("cat".equals(lower)){sRtn="application/vnd.ms-pki.seccat";}
 else if("cc".equals(lower)){sRtn="text/plain";}
 else if("cc".equals(lower)){sRtn="text/x-c";}
 else if("ccad".equals(lower)){sRtn="application/clariscad";}
 else if("cco".equals(lower)){sRtn="application/x-cocoa";}
 else if("cdf".equals(lower)){sRtn="application/cdf";}
 else if("cer".equals(lower)){sRtn="application/pkix-cert";}
 else if("cha".equals(lower)){sRtn="application/x-chat";}
 else if("chat".equals(lower)){sRtn="application/x-chat";}
 else if("com".equals(lower)){sRtn="text/plain";}
 else if("conf".equals(lower)){sRtn="text/plain";}
 else if("cpio".equals(lower)){sRtn="application/x-cpio";}
 else if("cpp".equals(lower)){sRtn="text/x-c";}
 else if("cpt".equals(lower)){sRtn="application/mac-compactpro";}
 else if("crl".equals(lower)){sRtn="application/pkcs-crl";}
 else if("crt".equals(lower)){sRtn="application/pkix-cert";}
 else if("csh".equals(lower)){sRtn="application/x-csh";}
 else if("csv".equals(lower)){sRtn="application/octet-stream";}
 else if("css".equals(lower)){sRtn="text/css";}
 else if("cxx".equals(lower)){sRtn="text/plain";}
 else if("dcr".equals(lower)){sRtn="application/x-director";}
 else if("deepv".equals(lower)){sRtn="application/x-deepv";}
 else if("def".equals(lower)){sRtn="text/plain";}
 else if("dif".equals(lower)){sRtn="video/x-dv";}
 else if("dir".equals(lower)){sRtn="application/x-director";}
 else if("dl".equals(lower)){sRtn="video/dl";}
 else if("doc".equals(lower)){sRtn="application/msword";}
 else if("dot".equals(lower)){sRtn="application/msword";}
 else if("dp".equals(lower)){sRtn="application/commonground";}
 else if("drw".equals(lower)){sRtn="application/drafting";}
 else if("dump".equals(lower)){sRtn="application/octet-stream";}
 else if("dv".equals(lower)){sRtn="video/x-dv";}
 else if("dvi".equals(lower)){sRtn="application/x-dvi";}
 else if("dwf".equals(lower)){sRtn="model/vnd.dwf";}
 else if("dwg".equals(lower)){sRtn="image/vnd.dwg";}
 else if("dwg".equals(lower)){sRtn="image/x-dwg";}
 else if("dxf".equals(lower)){sRtn="application/dxf";}
 else if("el".equals(lower)){sRtn="text/x-.elisp";}
 else if("elc".equals(lower)){sRtn="application/x-elc";}
 else if("env".equals(lower)){sRtn="application/x-envoy";}
 else if("eps".equals(lower)){sRtn="application/post";}
 else if("es".equals(lower)){sRtn="application/x-esrehber";}
 else if("etx".equals(lower)){sRtn="text/x-setext";}
 else if("evy".equals(lower)){sRtn="application/envoy";}
 else if("exe".equals(lower)){sRtn="application/octet-stream";}
 else if("f".equals(lower)){sRtn="text/plain";}
 else if("f77".equals(lower)){sRtn="text/x-fortran";}
 else if("f90".equals(lower)){sRtn="text/plain";}
 else if("f90".equals(lower)){sRtn="text/x-fortran";}
 else if("fdf".equals(lower)){sRtn="application/vnd.fdf";}
 else if("fif".equals(lower)){sRtn="application/fractals";}
 else if("fif".equals(lower)){sRtn="image/fif";}
 else if("fli".equals(lower)){sRtn="video/fli";}
 else if("flo".equals(lower)){sRtn="image/florian";}
 else if("flx".equals(lower)){sRtn="text/vnd.fmi.flexstor";}
 else if("fmf".equals(lower)){sRtn="video/x-atomic3d-feature";}
 else if("for".equals(lower)){sRtn="text/plain";}
 else if("fpx".equals(lower)){sRtn="image/vnd.fpx";}
 else if("frl".equals(lower)){sRtn="application/freeloader";}
 else if("funk".equals(lower)){sRtn="audio/make";}
 else if("g".equals(lower)){sRtn="text/plain";}
 else if("g3".equals(lower)){sRtn="image/g3fax";}
 else if("gif".equals(lower)){sRtn="image/gif";}
 else if("gl".equals(lower)){sRtn="video/gl";}
 else if("gsd".equals(lower)){sRtn="audio/x-gsm";}
 else if("gsm".equals(lower)){sRtn="audio/x-gsm";}
 else if("gsp".equals(lower)){sRtn="application/x-gsp";}
 else if("gss".equals(lower)){sRtn="application/x-gss";}
 else if("gtar".equals(lower)){sRtn="application/x-gtar";}
 else if("gz".equals(lower)){sRtn="application/x-compressed";}
 else if("gzip".equals(lower)){sRtn="application/x-gzip";}
 else if("h".equals(lower)){sRtn="text/plain";}
 else if("hdf".equals(lower)){sRtn="application/x-hdf";}
 else if("help".equals(lower)){sRtn="application/x-helpfile";}
 else if("hgl".equals(lower)){sRtn="application/vnd.hp-hpgl";}
 else if("hh".equals(lower)){sRtn="text/plain";}
 else if("hlb".equals(lower)){sRtn="text/x-";}
 else if("hlp".equals(lower)){sRtn="application/hlp";}
 else if("hpg".equals(lower)){sRtn="application/vnd.hp-hpgl";}
 else if("hpgl".equals(lower)){sRtn="application/vnd.hp-hpgl";}
 else if("hqx".equals(lower)){sRtn="application/binhex";}
 else if("hta".equals(lower)){sRtn="application/hta";}
 else if("htc".equals(lower)){sRtn="text/x-component";}
 else if("htm".equals(lower)){sRtn="text/html";}
 else if("html".equals(lower)){sRtn="text/html";}
 else if("htmls".equals(lower)){sRtn="text/html";}
 else if("htt".equals(lower)){sRtn="text/webviewhtml";}
 else if("htx".equals(lower)){sRtn="text/html";}
 else if("ice".equals(lower)){sRtn="x-conference/x-cooltalk";}
 else if("ico".equals(lower)){sRtn="image/x-icon";}
 else if("idc".equals(lower)){sRtn="text/plain";}
 else if("ief".equals(lower)){sRtn="image/ief";}
 else if("iefs".equals(lower)){sRtn="image/ief";}
 else if("iges".equals(lower)){sRtn="application/iges";}
 else if("iges".equals(lower)){sRtn="model/iges";}
 else if("igs".equals(lower)){sRtn="application/iges";}
 else if("ima".equals(lower)){sRtn="application/x-ima";}
 else if("imap".equals(lower)){sRtn="application/x-httpd-imap";}
 else if("inf".equals(lower)){sRtn="application/inf";}
 else if("ip".equals(lower)){sRtn="application/x-ip2";}
 else if("isu".equals(lower)){sRtn="video/x-isvideo";}
 else if("it".equals(lower)){sRtn="audio/it";}
 else if("iv".equals(lower)){sRtn="application/x-inventor";}
 else if("ivr".equals(lower)){sRtn="i-world/i-vrml";}
 else if("ivy".equals(lower)){sRtn="application/x-livescreen";}
 else if("jam".equals(lower)){sRtn="audio/x-jam";}
 else if("jav".equals(lower)){sRtn="text/plain";}
 else if("java".equals(lower)){sRtn="text/plain";}
 else if("jcm".equals(lower)){sRtn="application/x-java-commerce";}
 else if("jfif".equals(lower)){sRtn="image/jpeg";}
 else if("jfif-tbnl".equals(lower)){sRtn="image/jpeg";}
 else if("jpe".equals(lower)){sRtn="image/jpeg";}
 else if("jpeg".equals(lower)){sRtn="image/jpeg";}
 else if("jpg".equals(lower)){sRtn="image/jpeg";}
 else if("jps".equals(lower)){sRtn="image/x-jps";}
 else if("js".equals(lower)){sRtn="application/x-";}
 else if("jut".equals(lower)){sRtn="image/jutvision";}
 else if("kar".equals(lower)){sRtn="audio/midi";}
 else if("ksh".equals(lower)){sRtn="application/x-ksh";}
 else if("ksh".equals(lower)){sRtn="text/x-.ksh";}
 else if("la".equals(lower)){sRtn="audio/nspaudio";}
 else if("la".equals(lower)){sRtn="audio/x-nspaudio";}
 else if("lam".equals(lower)){sRtn="audio/x-liveaudio";}
 else if("latex".equals(lower)){sRtn="application/x-latex";}
 else if("lha".equals(lower)){sRtn="application/lha";}
 else if("lhx".equals(lower)){sRtn="application/octet-stream";}
 else if("list".equals(lower)){sRtn="text/plain";}
 else if("lma".equals(lower)){sRtn="audio/nspaudio";}
 else if("lma".equals(lower)){sRtn="audio/x-nspaudio";}
 else if("log".equals(lower)){sRtn="text/plain";}
 else if("lsp".equals(lower)){sRtn="application/x-lisp";}
 else if("lsp".equals(lower)){sRtn="text/x-.lisp";}
 else if("lst".equals(lower)){sRtn="text/plain";}
 else if("lsx".equals(lower)){sRtn="text/x-la-asf";}
 else if("ltx".equals(lower)){sRtn="application/x-latex";}
 else if("lzh".equals(lower)){sRtn="application/octet-stream";}
 else if("m".equals(lower)){sRtn="text/plain";}
 else if("m".equals(lower)){sRtn="text/x-m";}
 else if("m1v".equals(lower)){sRtn="video/mpeg";}
 else if("m2a".equals(lower)){sRtn="audio/mpeg";}
 else if("m2v".equals(lower)){sRtn="video/mpeg";}
 else if("m3u".equals(lower)){sRtn="audio/x-mpequrl";}
 else if("man".equals(lower)){sRtn="application/x-troff-man";}
 else if("map".equals(lower)){sRtn="application/x-navimap";}
 else if("mar".equals(lower)){sRtn="text/plain";}
 else if("mbd".equals(lower)){sRtn="application/mbedlet";}
 else if("mc$".equals(lower)){sRtn="application/x-magic-cap-package-1.0";}
 else if("mcd".equals(lower)){sRtn="application/mcad";}
 else if("mcf".equals(lower)){sRtn="image/vasa";}
 else if("mcp".equals(lower)){sRtn="application/netmc";}
 else if("me".equals(lower)){sRtn="application/x-troff-me";}
 else if("mht".equals(lower)){sRtn="message/rfc822";}
 else if("mhtml".equals(lower)){sRtn="message/rfc822";}
 else if("mid".equals(lower)){sRtn="application/x-midi";}
 else if("midi".equals(lower)){sRtn="application/x-midi";}
 else if("mif".equals(lower)){sRtn="application/x-frame";}
 else if("mime".equals(lower)){sRtn="message/rfc822";}
 else if("mjf".equals(lower)){sRtn="audio/x-vnd.audioexplosion.mjuicemediafile";}
 else if("mjpg".equals(lower)){sRtn="video/x-motion-jpeg";}
 else if("mm".equals(lower)){sRtn="application/base64";}
 else if("mme".equals(lower)){sRtn="application/base64";}
 else if("mod".equals(lower)){sRtn="audio/mod";}
 else if("moov".equals(lower)){sRtn="video/quicktime";}
 else if("mov".equals(lower)){sRtn="video/quicktime";}
 else if("movie".equals(lower)){sRtn="video/x-sgi-movie";}
 else if("mp2".equals(lower)){sRtn="audio/mpeg";}
 else if("mp3".equals(lower)){sRtn="audio/mpeg3";}
 else if("mpa".equals(lower)){sRtn="audio/mpeg";}
 else if("mpc".equals(lower)){sRtn="application/x-project";}
 else if("mpe".equals(lower)){sRtn="video/mpeg";}
 else if("mpeg".equals(lower)){sRtn="video/mpeg";}
 else if("mpg".equals(lower)){sRtn="audio/mpeg";}
 else if("mpga".equals(lower)){sRtn="audio/mpeg";}
 else if("mpp".equals(lower)){sRtn="application/vnd.ms-project";}
 else if("mpt".equals(lower)){sRtn="application/x-project";}
 else if("mpv".equals(lower)){sRtn="application/x-project";}
 else if("mpx".equals(lower)){sRtn="application/x-project";}
 else if("mrc".equals(lower)){sRtn="application/marc";}
 else if("ms".equals(lower)){sRtn="application/x-troff-ms";}
 else if("mv".equals(lower)){sRtn="video/x-sgi-movie";}
 else if("my".equals(lower)){sRtn="audio/make";}
 else if("mzz".equals(lower)){sRtn="application/x-vnd.audioexplosion.mzz";}
 else if("nap".equals(lower)){sRtn="image/naplps";}
 else if("naplps".equals(lower)){sRtn="image/naplps";}
 else if("nc".equals(lower)){sRtn="application/x-netcdf";}
 else if("ncm".equals(lower)){sRtn="application/vnd.nokia.configuration-message";}
 else if("nif".equals(lower)){sRtn="image/x-niff";}
 else if("niff".equals(lower)){sRtn="image/x-niff";}
 else if("nix".equals(lower)){sRtn="application/x-mix-transfer";}
 else if("nsc".equals(lower)){sRtn="application/x-conference";}
 else if("nvd".equals(lower)){sRtn="application/x-navidoc";}
 else if("o".equals(lower)){sRtn="application/octet-stream";}
 else if("oda".equals(lower)){sRtn="application/oda";}
 else if("omc".equals(lower)){sRtn="application/x-omc";}
 else if("omcd".equals(lower)){sRtn="application/x-omcdatamaker";}
 else if("omcr".equals(lower)){sRtn="application/x-omcregerator";}
 else if("p".equals(lower)){sRtn="text/x-pascal";}
 else if("p10".equals(lower)){sRtn="application/pkcs10";}
 else if("p12".equals(lower)){sRtn="application/pkcs-12";}
 else if("p7a".equals(lower)){sRtn="application/x-pkcs7-signature";}
 else if("p7c".equals(lower)){sRtn="application/pkcs7-mime";}
 else if("p7m".equals(lower)){sRtn="application/pkcs7-mime";}
 else if("p7r".equals(lower)){sRtn="application/x-pkcs7-certreqresp";}
 else if("p7s".equals(lower)){sRtn="application/pkcs7-signature";}
 else if("part".equals(lower)){sRtn="application/pro_eng";}
 else if("pas".equals(lower)){sRtn="text/pascal";}
 else if("pbm".equals(lower)){sRtn="image/x-portable-bitmap";}
 else if("pcl".equals(lower)){sRtn="application/vnd.hp-pcl";}
 else if("pct".equals(lower)){sRtn="image/x-pict";}
 else if("pcx".equals(lower)){sRtn="image/x-pcx";}
 else if("pdb".equals(lower)){sRtn="chemical/x-pdb";}
 else if("pdf".equals(lower)){sRtn="application/pdf";}
 else if("pfunk".equals(lower)){sRtn="audio/make";}
 else if("pgm".equals(lower)){sRtn="image/x-portable-graymap";}
 else if("pgm".equals(lower)){sRtn="image/x-portable-greymap";}
 else if("pic".equals(lower)){sRtn="image/pict";}
 else if("pict".equals(lower)){sRtn="image/pict";}
 else if("pkg".equals(lower)){sRtn="application/x-newton-compatible-pkg";}
 else if("pko".equals(lower)){sRtn="application/vnd.ms-pki.pko";}
 else if("pl".equals(lower)){sRtn="text/plain";}
 else if("plx".equals(lower)){sRtn="application/x-pixcl";}
 else if("pm".equals(lower)){sRtn="image/x-xpixmap";}
 else if("pm4".equals(lower)){sRtn="application/x-pagemaker";}
 else if("pm5".equals(lower)){sRtn="application/x-pagemaker";}
 else if("png".equals(lower)){sRtn="image/png";}
 else if("pnm".equals(lower)){sRtn="application/x-portable-anymap";}
 else if("pot".equals(lower)){sRtn="application/mspowerpoint";}
 else if("pov".equals(lower)){sRtn="model/x-pov";}
 else if("ppa".equals(lower)){sRtn="application/vnd.ms-powerpoint";}
 else if("ppm".equals(lower)){sRtn="image/x-portable-pixmap";}
 else if("pps".equals(lower)){sRtn="application/mspowerpoint";}
 else if("ppt".equals(lower)){sRtn="application/mspowerpoint";}
 else if("ppt".equals(lower)){sRtn="application/vnd.ms-powerpoint";}
 else if("ppz".equals(lower)){sRtn="application/mspowerpoint";}
 else if("pre".equals(lower)){sRtn="application/x-freelance";}
 else if("prt".equals(lower)){sRtn="application/pro_eng";}
 else if("ps".equals(lower)){sRtn="application/post";}
 else if("psd".equals(lower)){sRtn="application/octet-stream";}
 else if("pvu".equals(lower)){sRtn="paleovu/x-pv";}
 else if("pwz".equals(lower)){sRtn="application/vnd.ms-powerpoint";}
 else if("py".equals(lower)){sRtn="text/x-.phyton";}
 else if("pyc".equals(lower)){sRtn="applicaiton/x-bytecode.python";}
 else if("qcp".equals(lower)){sRtn="audio/vnd.qcelp";}
 else if("qd3".equals(lower)){sRtn="x-world/x-3dmf";}
 else if("qd3d".equals(lower)){sRtn="x-world/x-3dmf";}
 else if("qif".equals(lower)){sRtn="image/x-quicktime";}
 else if("qt".equals(lower)){sRtn="video/quicktime";}
 else if("qtc".equals(lower)){sRtn="video/x-qtc";}
 else if("qti".equals(lower)){sRtn="image/x-quicktime";}
 else if("qtif".equals(lower)){sRtn="image/x-quicktime";}
 else if("ra".equals(lower)){sRtn="audio/x-pn-realaudio";}
 else if("ram".equals(lower)){sRtn="audio/x-pn-realaudio";}
 else if("ras".equals(lower)){sRtn="application/x-cmu-raster";}
 else if("rast".equals(lower)){sRtn="image/cmu-raster";}
 else if("rexx".equals(lower)){sRtn="text/x-.rexx";}
 else if("rf".equals(lower)){sRtn="image/vnd.rn-realflash";}
 else if("rgb".equals(lower)){sRtn="image/x-rgb";}
 else if("rm".equals(lower)){sRtn="application/vnd.rn-realmedia";}
 else if("rmi".equals(lower)){sRtn="audio/mid";}
 else if("rmm".equals(lower)){sRtn="audio/x-pn-realaudio";}
 else if("rmp".equals(lower)){sRtn="audio/x-pn-realaudio";}
 else if("rng".equals(lower)){sRtn="application/ringing-tones";}
 else if("rnx".equals(lower)){sRtn="application/vnd.rn-realplayer";}
 else if("roff".equals(lower)){sRtn="application/x-troff";}
 else if("rp".equals(lower)){sRtn="image/vnd.rn-realpix";}
 else if("rpm".equals(lower)){sRtn="audio/x-pn-realaudio-plugin";}
 else if("rt".equals(lower)){sRtn="text/richtext";}
 else if("rtf".equals(lower)){sRtn="application/rtf";}
 else if("rtx".equals(lower)){sRtn="application/rtf";}
 else if("rv".equals(lower)){sRtn="video/vnd.rn-realvideo";}
 else if("s".equals(lower)){sRtn="text/x-asm";}
 else if("s3m".equals(lower)){sRtn="audio/s3m";}
 else if("saveme".equals(lower)){sRtn="application/octet-stream";}
 else if("sbk".equals(lower)){sRtn="application/x-tbook";}
 else if("scm".equals(lower)){sRtn="application/x-lotusscreencam";}
 else if("sdml".equals(lower)){sRtn="text/plain";}
 else if("sdp".equals(lower)){sRtn="application/sdp";}
 else if("sdr".equals(lower)){sRtn="application/sounder";}
 else if("sea".equals(lower)){sRtn="application/sea";}
 else if("set".equals(lower)){sRtn="application/set";}
 else if("sgm".equals(lower)){sRtn="text/sgml";}
 else if("sgml".equals(lower)){sRtn="text/sgml";}
 else if("sh".equals(lower)){sRtn="application/x-bsh";}
 else if("shar".equals(lower)){sRtn="application/x-bsh";}
 else if("shtml".equals(lower)){sRtn="text/html";}
 else if("sid".equals(lower)){sRtn="audio/x-psid";}
 else if("sit".equals(lower)){sRtn="application/x-sit";}
 else if("skd".equals(lower)){sRtn="application/x-koan";}
 else if("skm".equals(lower)){sRtn="application/x-koan";}
 else if("skp".equals(lower)){sRtn="application/x-koan";}
 else if("skt".equals(lower)){sRtn="application/x-koan";}
 else if("sl".equals(lower)){sRtn="application/x-seelogo";}
 else if("smi".equals(lower)){sRtn="application/smil";}
 else if("smil".equals(lower)){sRtn="application/smil";}
 else if("snd".equals(lower)){sRtn="audio/basic";}
 else if("sol".equals(lower)){sRtn="application/solids";}
 else if("spc".equals(lower)){sRtn="application/x-pkcs7-certificates";}
 else if("spl".equals(lower)){sRtn="application/futuresplash";}
 else if("spr".equals(lower)){sRtn="application/x-sprite";}
 else if("sprite".equals(lower)){sRtn="application/x-sprite";}
 else if("src".equals(lower)){sRtn="application/x-wais-source";}
 else if("ssi".equals(lower)){sRtn="text/x-server-parsed-html";}
 else if("ssm".equals(lower)){sRtn="application/streamingmedia";}
 else if("sst".equals(lower)){sRtn="application/vnd.ms-pki.certstore";}
 else if("step".equals(lower)){sRtn="application/step";}
 else if("stl".equals(lower)){sRtn="application/sla";}
 else if("stp".equals(lower)){sRtn="application/step";}
 else if("sv4cpio".equals(lower)){sRtn="application/x-sv4cpio";}
 else if("sv4crc".equals(lower)){sRtn="application/x-sv4crc";}
 else if("svf".equals(lower)){sRtn="image/vnd.dwg";}
 else if("svr".equals(lower)){sRtn="application/x-world";}
 else if("swf".equals(lower)){sRtn="application/x-shockwave-flash";}
 else if("t".equals(lower)){sRtn="application/x-troff";}
 else if("talk".equals(lower)){sRtn="text/x-speech";}
 else if("tar".equals(lower)){sRtn="application/x-tar";}
 else if("tbk".equals(lower)){sRtn="application/toolbook";}
 else if("tcl".equals(lower)){sRtn="application/x-tcl";}
 else if("tcsh".equals(lower)){sRtn="text/x-.tcsh";}
 else if("tex".equals(lower)){sRtn="application/x-tex";}
 else if("texi".equals(lower)){sRtn="application/x-texinfo";}
 else if("texinfo".equals(lower)){sRtn="application/x-texinfo";}
 else if("text".equals(lower)){sRtn="application/plain";}
 else if("tgz".equals(lower)){sRtn="application/gnutar";}
 else if("tif".equals(lower)){sRtn="image/tiff";}
 else if("tiff".equals(lower)){sRtn="image/tiff";}
 else if("tr".equals(lower)){sRtn="application/x-troff";}
 else if("tsi".equals(lower)){sRtn="audio/tsp-audio";}
 else if("tsp".equals(lower)){sRtn="application/dsptype";}
 else if("tsv".equals(lower)){sRtn="text/tab-separated-values";}
 else if("turbot".equals(lower)){sRtn="image/florian";}
 else if("txt".equals(lower)){sRtn="application/octet-stream";}
 else if("uil".equals(lower)){sRtn="text/x-uil";}
 else if("uni".equals(lower)){sRtn="text/uri-list";}
 else if("unis".equals(lower)){sRtn="text/uri-list";}
 else if("unv".equals(lower)){sRtn="application/i-deas";}
 else if("uri".equals(lower)){sRtn="text/uri-list";}
 else if("uris".equals(lower)){sRtn="text/uri-list";}
 else if("ustar".equals(lower)){sRtn="application/x-ustar";}
 else if("uu".equals(lower)){sRtn="application/octet-stream";}
 else if("uue".equals(lower)){sRtn="text/x-uuencode";}
 else if("vcd".equals(lower)){sRtn="application/x-cdlink";}
 else if("vcs".equals(lower)){sRtn="text/x-vcalendar";}
 else if("vda".equals(lower)){sRtn="application/vda";}
 else if("vdo".equals(lower)){sRtn="video/vdo";}
 else if("vew".equals(lower)){sRtn="application/groupwise";}
 else if("viv".equals(lower)){sRtn="video/vivo";}
 else if("vivo".equals(lower)){sRtn="video/vivo";}
 else if("vmd".equals(lower)){sRtn="application/vocaltec-media-desc";}
 else if("vmf".equals(lower)){sRtn="application/vocaltec-media-file";}
 else if("voc".equals(lower)){sRtn="audio/voc";}
 else if("vos".equals(lower)){sRtn="video/vosaic";}
 else if("vox".equals(lower)){sRtn="audio/voxware";}
 else if("vqe".equals(lower)){sRtn="audio/x-twinvq-plugin";}
 else if("vqf".equals(lower)){sRtn="audio/x-twinvq";}
 else if("vql".equals(lower)){sRtn="audio/x-twinvq-plugin";}
 else if("vrml".equals(lower)){sRtn="application/x-vrml";}
 else if("vrt".equals(lower)){sRtn="x-world/x-vrt";}
 else if("vsd".equals(lower)){sRtn="application/x-visio";}
 else if("vst".equals(lower)){sRtn="application/x-visio";}
 else if("vsw".equals(lower)){sRtn="application/x-visio";}
 else if("w60".equals(lower)){sRtn="application/wordperfect6.0";}
 else if("w61".equals(lower)){sRtn="application/wordperfect6.1";}
 else if("w6w".equals(lower)){sRtn="application/msword";}
 else if("wav".equals(lower)){sRtn="audio/wav";}
 else if("wb1".equals(lower)){sRtn="application/x-qpro";}
 else if("wbmp".equals(lower)){sRtn="image/vnd.wap.wbmp";}
 else if("web".equals(lower)){sRtn="application/vnd.xara";}
 else if("wiz".equals(lower)){sRtn="application/msword";}
 else if("wk1".equals(lower)){sRtn="application/x-123";}
 else if("wmf".equals(lower)){sRtn="windows/metafile";}
 else if("wml".equals(lower)){sRtn="text/vnd.wap.wml";}
 else if("wmlc".equals(lower)){sRtn="application/vnd.wap.wmlc";}
 else if("wmls".equals(lower)){sRtn="text/vnd.wap.wml";}
 else if("wmlsc".equals(lower)){sRtn="application/vnd.wap.wmlc";}
 else if("word".equals(lower)){sRtn="application/msword";}
 else if("wp".equals(lower)){sRtn="application/wordperfect";}
 else if("wp5".equals(lower)){sRtn="application/wordperfect";}
 else if("wp6".equals(lower)){sRtn="application/wordperfect";}
 else if("wpd".equals(lower)){sRtn="application/wordperfect";}
 else if("wq1".equals(lower)){sRtn="application/x-lotus";}
 else if("wri".equals(lower)){sRtn="application/mswrite";}
 else if("wrl".equals(lower)){sRtn="application/x-world";}
 else if("wrz".equals(lower)){sRtn="model/vrml";}
 else if("wsc".equals(lower)){sRtn="text/scriplet";}
 else if("wsrc".equals(lower)){sRtn="application/x-wais-source";}
 else if("wtk".equals(lower)){sRtn="application/x-wintalk";}
 else if("xbm".equals(lower)){sRtn="image/x-xbitmap";}
 else if("xdr".equals(lower)){sRtn="video/x-amt-demorun";}
 else if("xgz".equals(lower)){sRtn="xgl/drawing";}
 else if("xif".equals(lower)){sRtn="image/vnd.xiff";}
 else if("xl".equals(lower)){sRtn="application/excel";}
 else if("xla".equals(lower)){sRtn="application/excel";}
 else if("xlb".equals(lower)){sRtn="application/excel";}
 else if("xlc".equals(lower)){sRtn="application/excel";}
 else if("xld".equals(lower)){sRtn="application/excel";}
 else if("xlk".equals(lower)){sRtn="application/excel";}
 else if("xll".equals(lower)){sRtn="application/excel";}
 else if("xlm".equals(lower)){sRtn="application/excel";}
 else if("xls".equals(lower)){sRtn="appliction/vnd.ms-excel;charset=euc-kr";}
 else if("xlt".equals(lower)){sRtn="application/excel";}
 else if("xlv".equals(lower)){sRtn="application/excel";}
 else if("xlw".equals(lower)){sRtn="application/excel";}
 else if("xm".equals(lower)){sRtn="audio/xm";}
 else if("xml".equals(lower)){sRtn="application/xml";}
 else if("xmz".equals(lower)){sRtn="xgl/movie";}
 else if("xpix".equals(lower)){sRtn="application/x-vnd.ls-xpix";}
 else if("xpm".equals(lower)){sRtn="image/x-xpixmap";}
 else if("xpm".equals(lower)){sRtn="image/xpm";}
 else if("x-png".equals(lower)){sRtn="image/png";}
 else if("xsr".equals(lower)){sRtn="video/x-amt-showrun";}
 else if("xwd".equals(lower)){sRtn="image/x-xwd";}
 else if("xyz".equals(lower)){sRtn="chemical/x-pdb";}
 else if("z".equals(lower)){sRtn="application/x-compress";}
 else if("zip".equals(lower)){sRtn="application/zip";}
 else if("zoo".equals(lower)){sRtn="application/octet-stream";}
 else if("zsh".equals(lower)){sRtn="text/x-.zsh";}
  else if("jsp".equals(lower)){sRtn="text/plain";}
 else{sRtn="application/octet-stream";}
 System.out.println(sRtn);
 return sRtn;
}
%>


 

추천 비추천

0

고정닉 0

0

댓글 영역

전체 댓글 0
등록순정렬 기준선택
본문 보기

하단 갤러리 리스트 영역

왼쪽 컨텐츠 영역

갤러리 리스트 영역

갤러리 리스트
번호 제목 글쓴이 작성일 조회 추천
설문 외모와 달리 술 일절 못 마셔 가장 의외인 스타는? 운영자 24/07/01 - -
173833 법으로 비밀번호를 인코딩해서 저장하도록 하면 안되나?? [3] Vita500갤로그로 이동합니다. 10.03.09 115 0
173829 2003년 9월에 내가 데브피아에 올린 낚시... [4] 물속의다이아갤로그로 이동합니다. 10.03.09 183 0
173828 C#에는 include가 없나요? [7] 물속의다이아갤로그로 이동합니다. 10.03.09 165 0
173826 옛날에 내가 올렸던 질문글들을 찾아서 봤는데... [4] 외계달팽갤로그로 이동합니다. 10.03.09 90 0
173825 아.. 코딩용 노트북 고민되네.. ㅡ.ㅡ [4] 냐하(211.62) 10.03.09 227 0
173824 라인단위로 돈받으면 존나 재밌겠다 [9] ㄹㄹ(116.123) 10.03.09 206 0
173823 프로그램에 이런 기능넣으려면 어케해야함? 화면녹화 [5] ㅁㄴㅇㄹ(125.188) 10.03.09 126 0
173822 헤헷 ^^* [4] 개쉛기갤로그로 이동합니다. 10.03.09 137 0
173821 자바 초보인데 초보적인 질문 좀 해도될까나요? [2] 자바허저비(121.170) 10.03.09 105 0
173820 자동 짤방에 플래쉬가 왜 안되는지 물어봤는데 [4] Vita500갤로그로 이동합니다. 10.03.09 121 0
173819 열심히하는건 누구나 할 수 있어여 [7] 온순한감자갤로그로 이동합니다. 10.03.09 174 0
173818 국비학원나오면 취업되나요? (121.132) 10.03.09 182 0
173816 c++ 함수 프로토타입 뒤에 ; 없이 변수나오는거 뭐임? [1] 성검블마(155.230) 10.03.09 84 0
173815 c기초플러스 사려는데 5판 4판중에 머사요?? [2] 야매뗴(58.238) 10.03.09 85 0
173813 모바일에 통달하신 횽들은 봐주시면 엄청 감솨 [6] 왓썹베베갤로그로 이동합니다. 10.03.09 140 0
173812 애플의 파이널 컷 프로가 더 낳냐, 소니 베가스가 더 낳냐 [5] 오사카(221.153) 10.03.09 374 0
173811 아이폰 유료 데이터, 이게 뭡니까? [5] Vita500갤로그로 이동합니다. 10.03.09 144 0
173810 횽들 php랑 자바스크립 개념서 없을까? [1] 튀김우동(211.218) 10.03.09 83 0
173809 유닉스 OS에서 할 수 있는 재밌는짓 추천점. [4] ??(203.255) 10.03.09 97 0
173808 스트러츠 jsp경로를 알수없네요 [2] usoo0갤로그로 이동합니다. 10.03.09 113 0
173807 간단한 문제 [12] 컴공과(203.253) 10.03.09 168 0
173806 지금 새로운 프라젝트에 관련된 소스파일을 받았다. [4] 개쉛기갤로그로 이동합니다. 10.03.09 122 0
173804 SQL 서적 하나만 추천 빨리 급함 [5] Mayu갤로그로 이동합니다. 10.03.09 116 0
173803 이건 뭐가 보여서 하는건가? [5] 유리한갤로그로 이동합니다. 10.03.09 115 0
173802 스트러츠 질문.. [2] usoo0갤로그로 이동합니다. 10.03.09 75 0
173800 스타크래프트 트루퍼스 [6] 유리한갤로그로 이동합니다. 10.03.09 136 0
173799 동영상 업뎃했습니다 [4] McHello갤로그로 이동합니다. 10.03.09 97 0
173798 친구가 집에서 자고간 다음날 [3] 유리한갤로그로 이동합니다. 10.03.09 129 0
173797 센스쟁이횽아는 봄.니.다. [3] 물속의다이아갤로그로 이동합니다. 10.03.09 84 0
173796 내가요, 뭐하나 물어볼께요 [2] 고추장불고기갤로그로 이동합니다. 10.03.09 79 0
173795 아 파폭 세션 처리가 머같네 [8] 센스쟁이횽아갤로그로 이동합니다. 10.03.09 121 0
173794 어제 여의도 플젝한 내 동기랑 같은 팀 과장님하고 술을 한잔 했는데... [9] 물속의다이아갤로그로 이동합니다. 10.03.09 283 0
173793 이 선생님 우리 대학원으로 모시면 안 될까? 오사카(221.153) 10.03.09 108 0
173792 형들 암웨이 들어가면.. [2] (122.128) 10.03.09 151 0
173790 사랑비 [4] Vita500갤로그로 이동합니다. 10.03.09 166 0
173789 애플, 앱스토어 ‘수질 관리’ 나선다 [1] JuEUS-U갤로그로 이동합니다. 10.03.09 130 0
173788 안녕하세요 뉴빕니다 이힛~ [1] 이셋냥갤로그로 이동합니다. 10.03.09 67 0
173787 고추에 관한 이야기 [1] (122.128) 10.03.09 101 0
173786 씬입사원은 봅니다 [2] 오사카(221.153) 10.03.09 135 0
173785 C 입문 개뉴비 새벽까지 .... [1] 크준이갤로그로 이동합니다. 10.03.09 106 0
173784 연봉 3천인 횽아들은 봅니다 [2] 적금(124.217) 10.03.09 229 0
173783 노트북.. 10만원대 똥컴도 구하기 힘들구나.. 씬입사원갤로그로 이동합니다. 10.03.09 85 0
173782 안 깨지는 게 어딨니 ? 다 깨지지. [2] 때릴꺼야?(116.40) 10.03.09 115 0
173779 이거 왜이래?? [2] 막장트렌드갤로그로 이동합니다. 10.03.09 69 0
173777 C++ 질문드립니다 개 초보 질문... [2] Young_갤로그로 이동합니다. 10.03.09 96 0
173776 과제인데 도와주세요 Only.갤로그로 이동합니다. 10.03.09 95 0
173773 나의 리즈시절 [1] 아잉따잉갤로그로 이동합니다. 10.03.09 116 0
173772 낼까지 꼭 내야하는 졸업논문인데, 아이디어만 냈어요. 코딩좀 해주세요 ㅠ [9] 씬입사원갤로그로 이동합니다. 10.03.09 233 0
173771 아유 강다니깐여 [9] 유리한갤로그로 이동합니다. 10.03.09 126 0
173769 평신같은 로또 프로그램 성대아싸(121.137) 10.03.09 66 0
갤러리 내부 검색
제목+내용게시물 정렬 옵션

오른쪽 컨텐츠 영역

실시간 베스트

1/8

뉴스

디시미디어

디시이슈

1/2