弹出的错误信息是java.lang.NegativeArraySizeException,请大家帮帮忙阿

解决方案 »

  1.   

    直接使用struts里自带的上传组件不就行了,更简单方便
      

  2.   

    struts 没有下载这个例子,而smartupload 在ACTION用不知道为什么不好使?
      SmartUpload su = new SmartUpload();
              try {
                su.initialize(getServlet().getServletConfig(), httpServletRequest,
                              httpServletResponse);
              }
              catch (ServletException ex) {
              }
              su.setContentDisposition(null);
              String key = new String("key");
              try {
                su.downloadFile(key, "application/x-msdownload", "aa.txt");
              }
              catch (ServletException ex) {
              }
              catch (IOException ex) {
              }
              catch (SmartUploadException ex) {
              }
              httpServletRequest.setAttribute("ActionForm", ActionForm);
              return (actionMapping.findForward("new"));页面根本没显示