반응형 Web Programing!301 [JSP] 이미지파일 다운로드 구현하기 response.setHeader("Content-Type","image/jpg"); String dFileName= "test.jpg";//다운시 지정할 파일명 String filename2 = new String(dFileName.getBytes("8859_1"),"euc-kr"); //한글 파일일 경ㅇ우 String path = "c:/"; //서버의 경로 java.io.File file = new java.io.File(path+"lee.jpg");//서버상의 존재하는 파일명 byte b[] = new byte[(int)file.length()]; System.out.println( "size : " + b.length); System.out.pr.. 2011. 9. 22. [JSP] 파일경로, 디렉토리, 파일명 추출하기 0){ cur_FileNameFull = a_tmpStrPath[jjuux-1]; //맨 마지막 것이.... 파일임.. } if( ! cur_FileNameFull.equals("") ){ //cur_FileNameFull 이 있다면... ""와 같지 않다면... out.print("cur_FileNameFull=" + cur_FileNameFull ); //파일명에서, 확장자를 제거한, 순수 파일명만 추출하기... int i_ext; i_ext = cur_FileNameFull.lastIndexOf("."); //문자열 뒤쪽에서 . 위치 찾기 //out.print(" i_ext= " + i_ext) ; String cur_FileName_ONLY = ""; cur_FileName_ONLY = cur_F.. 2011. 9. 21. [JSP] 다중업로드/다운로드 fileSelectForm.jsp [다중 파일 선택] 여러개의 파일을 업로드 하는 예제 파일갯수를 입력한 후 [확인]버튼을 눌러주세요. 입력이 완료되면 파일업로드를 위한 [업로드]버튼을 눌러주세요 작성자 제목 내용 업로드할 파일 수 입력 fileSelectPro.jsp (파일 업로드) 작성자 제목 내용 업로드된 파일 리스트 file_down.jsp [다운로드] 2011. 9. 20. [JSP] Tomcat5.5에서 Spring 사용시 JSTL이 제대로 표현이 안될 때 Tomcat5.5에서는 JSTL 1.1 버젼을 사용해야 합니다. 1.1.0.zip jstl.jar와 standard.jar를 bli 폴더에 넣고 스프링 web.xml 에서 위처럼 되어 있는 설정을 아래와 같이 바꾸어 주면 사용 tomcat 5.5에서도 jstl을 사용 할 수 있습니다 2011. 9. 20. 이전 1 ··· 44 45 46 47 48 49 50 ··· 76 다음 반응형