SmartUpload mySmartUpload = new SmartUpload();
mySmartUpload.initialize(getServlet().getServletConfig(),request,response);
mySmartUpload.upload();
执行到这里就不动了,死循环,看源码,就是这里死循环
for (; -1 < i && i < totalBytes; i = i + j) {
try {
request.getInputStream();
j = request.getInputStream().read(binArray, i, totalBytes - i);
} catch (Exception exception) {
throw new FwUploadException("Unable to upload.");
}
}
然后添加如下代码
if (j == -1)
throw new Exception();
还是不行,直接就出来了,
怎么办,水能告诉我,谢谢
如果有现成的例子发到我的邮箱,只要解决问题,马上给分
mySmartUpload.initialize(getServlet().getServletConfig(),request,response);
mySmartUpload.upload();
执行到这里就不动了,死循环,看源码,就是这里死循环
for (; -1 < i && i < totalBytes; i = i + j) {
try {
request.getInputStream();
j = request.getInputStream().read(binArray, i, totalBytes - i);
} catch (Exception exception) {
throw new FwUploadException("Unable to upload.");
}
}
然后添加如下代码
if (j == -1)
throw new Exception();
还是不行,直接就出来了,
怎么办,水能告诉我,谢谢
如果有现成的例子发到我的邮箱,只要解决问题,马上给分
上面的目录里面就有
<html:form action="/uploadFile" method="post"
enctype="multipart/form-data">
<html:file property="theFile"></html:file>
<html:submit />
</html:form>