Chuyên đề J2EE nâng cao tuần 5

10 415 0
Chuyên đề J2EE nâng cao tuần 5

Đang tải... (xem toàn văn)

Thông tin tài liệu

Chuyên đề J2EE nâng cao http://sites.google.com/site/tinhuynhuit CHUYÊN ĐỀ J2EE NÂNG CAO BÀI TẬP THỰC HÀNH TUẦN UPLOAD FILE VÀ SEND EMAIL Nội dung Upload file 2 Web mail http://groups.google.com.vn/group/huflit_j2ee Chuyên đề J2EE nâng cao http://sites.google.com/site/tinhuynhuit Upload file y =” - / -d ” y y d y y y d phân - - -Trang upload.jsp y =” d” ” y d upload.jsp d d Chuyên đề J2EE nâng cao - y d d d - http://sites.google.com/site/tinhuynhuit d d y d d upload.jsp http://groups.google.com.vn/group/huflit_j2ee d Chuyên đề J2EE nâng cao - http://sites.google.com/site/tinhuynhuit y d d d d d ) Chuyên đề J2EE nâng cao http://sites.google.com/site/tinhuynhuit Web mail - d - - yd d” MailSender http://groups.google.com.vn/group/huflit_j2ee y d Chuyên đề J2EE nâng cao - d http://sites.google.com/site/tinhuynhuit Chuyên đề J2EE nâng cao http://sites.google.com/site/tinhuynhuit U = m_totalBytes) break; if(arr[searchPos] == (byte)m_boundary.charAt(keyPos)){ if(keyPos == boundaryLen - 1){ m_endData = ((searchPos - boundaryLen) + 1) - 2; break; } searchPos++; keyPos++; } else{ searchPos++; keyPos = 0; } } while(true); // Here m_startData and m_endData is what we need http://groups.google.com.vn/group/huflit_j2ee */ Chuyên đề J2EE nâng cao http://sites.google.com/site/tinhuynhuit //Get file name String filename =dataHeader.substring(dataHeader.indexOf("filename=\"")+10); filename = filename.substring(0,filename.indexOf("\n")); filename = filename.substring(filename.lastIndexOf("\\")+1,filename.indexOf("\"")); String dir="C:/jakarta-tomcat-4.1.27/webapps/webmail/data/"; //Now try to write output file here FileOutputStream fos; fos = new FileOutputStream(dir+filename); for (int n=m_startData; n Website lý thuyết: http://sites.google.com/site/tinhuynhuit/courses/developenterprise-application-with-jee Group thực hành: https://groups.google.com/forum/?hl=vi#!forum/huflit_j2ee

Ngày đăng: 31/08/2016, 09:54

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan