看板 java 關於我們 聯絡資訊
最近有個作業是要寫一個上傳檔案的程式 是透過html 表單 然後後台接 存在local端資料夾 因為要寫成client-server端 要兩個專案這樣 簡單說client是html 透過表單送到server端來處理 但因為要用web service掛在tomcat上 server這邊程式就不能用以下程式碼方式 //@WebServlet("/uploadpage") @MultipartConfig(fileSizeThreshold = 1024 * 1024 * 2, // 2MB maxFileSize = 1024 * 1024 * 10, // 10MB maxRequestSize = 1024 * 1024 * 50) // 50MB public class uploadpage extends HttpServlet { private static final String SAVE_DIR = "uploadFile"; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {.....} 是要用filestream的話 要怎麼接表單?? 那請問大概要怎麼解的 新手問題多多包涵 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 163.32.125.187 ※ 文章網址: https://www.ptt.cc/bbs/java/M.1437738690.A.F12.html
Dnight: ...你問這種問題是上課沒聽嗎 07/24 20:08
healthlin: 拜託給點提示 > <謝謝 07/24 20:15
Dnight: 你先說明知不知道為什麼不能用哪斷程式碼 07/27 20:20