我在用jspsmartupload组件上传文件时!在表单里既有file,又有其他的text!
当我加了ENCTYPE="multipart/form-data"时只能得到文件!  text得不到!
不加又不法上传!  网上说可以用mysmartupload.getrequest().getParameter("textname");  得到!  但我试了得到的还是空值!  谁能解决这个问题????????

解决方案 »

  1.   

    mySmartUpload.getRequest().getParameter("textname");
    是可以得到的,检查一下是不是其它的疏忽造成的.
      

  2.   

    呵呵~~这个问题,我很早以前用SmartUoload 包的时候,也碰到了,研究了一段时间才搞定~~你就是要注意,要等文件上传 mysmartupload.upload()后,再mysmartupload.getrequest().getParameter("textname");初始化:
              SmartUpload mysmartupload=new SmartUpload();
              mysmartupload.initialize(pageContext);
              mysmartupload.setTotalMaxFileSize(5*1024*1024);
    上传:     
              mysmartupload.upload();
    取值:
              String textname=mysmartupload.getrequest().getParameter("textname");
    你可以试下!