[問題] 關於html表單

作者: healthlin (lin)   2015-07-24 19:51:28
最近有個作業是要寫一個上傳檔案的程式
是透過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的話 要怎麼接表單??
那請問大概要怎麼解的
新手問題多多包涵 謝謝
作者: Dnight (暗夜)   2015-07-24 20:08:00
...你問這種問題是上課沒聽嗎
作者: healthlin (lin)   2015-07-24 20:15:00
拜託給點提示 > <謝謝
作者: Dnight (暗夜)   2015-07-27 20:20:00
你先說明知不知道為什麼不能用哪斷程式碼

Links booklink

Contact Us: admin [ a t ] ucptt.com