作者healthlin (lin)
看板java
标题[问题] 关於html表单
时间Fri Jul 24 19:51:28 2015
最近有个作业是要写一个上传档案的程式
是透过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://webptt.com/cn.aspx?n=bbs/java/M.1437738690.A.F12.html
1F:推 Dnight: ...你问这种问题是上课没听吗 07/24 20:08
2F:→ healthlin: 拜托给点提示 > <谢谢 07/24 20:15
3F:推 Dnight: 你先说明知不知道为什麽不能用哪断程式码 07/27 20:20