2017-08-25 10:12

@JFinal 运行换成tomcat就好了!在GlassFish上存在问题

2017-08-25 10:05

@JFinal 引用的jar包都是jfinal-3.2-all.zip里头相关的jar包,也包含了cos-2017.5.jar。很奇怪。

2017-08-24 20:53

@JFinal getFile时报上面的错误,没有重定向。客户端是普通浏览器Chrome,html直接post上传文件,下面是:
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding:gzip, deflate, br
Accept-Language:zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control:max-age=0
Connection:keep-alive
Content-Length:79649
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryJZFInYCiBaVMkEiZ
Cookie:JSESSIONID=446431f154900a8fc4d657f60eb3
Host:localhost:8080
Origin:http://localhost:8080
Referer:http://localhost:8080/product/save
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
Request Payload
------WebKitFormBoundaryJZFInYCiBaVMkEiZ
Content-Disposition: form-data; name="prdFile"; filename="无标题.png"
Content-Type: image/png


------WebKitFormBoundaryJZFInYCiBaVMkEiZ--

2017-08-24 17:54

form id="prodFileUploadForm" action="/product/upload" method="POST" class="am-form" enctype="multipart/form-data"
input id="prdFile" name="prdFile" type="file"
input id="upload_btn" type="submit" value="上传"
form

2017-08-24 17:52

@JFinal








Controller:
public void upload() {
UploadFile uploadFile = getFile();
}

非常简单的java类,还是出同样的错误?难道是jdk或是glassfish server的原因?