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();
还是不行,直接就出来了,
怎么办,水能告诉我,谢谢
如果有现成的例子发到我的邮箱,只要解决问题,马上给分

解决方案 »

  1.   

    http://www.cs.utexas.edu/users/s2s/latest/icc1a/src/upload_system/jspsmartupload/   
        
      上面的目录里面就有
      

  2.   

    我看了,但是没有怎么在struts中使用阿,我的在jsp页面上写上传代码没有问题,执行成功的,不过还是谢谢 你
      

  3.   

    用其他方式也可以实现,我现在就是想在struts中实现
      

  4.   

    下面是我的页面代码
    <html:form action="/uploadFile" method="post"
    enctype="multipart/form-data">
    <html:file property="theFile"></html:file>
    <html:submit />
    </html:form>