我在应用jspsmartupload组件取值时总是取null值,
在提交页面上已经加了<form name="form1" enctype="multipart/form-data"   method="post"   action="upload.jsp">   中的 enctype="multipart/form-data"
而且upload.jsp页面的取值也用的   su.getRequest().getParameter("test")类似的方法,并且su也初始化了    su.initialize(pagecontext);   
  su.upload();
还有什么会影响到取值吗?test是在提交页面上的一个普通的<input type="text" name="test" value="123">
 

解决方案 »

  1.   

    还是用commons-fileupload吧,jspsmartupload在上传大文件时,会有内存泄漏的风险。参考我们的jsp教程中,关于文件上传的讲解:http://family168.com/tutorial/jsp/html/jsp-ch-11.html
      

  2.   

    谢谢,我学习学习,但是我需要提交的文件比较小,smartupload还可以应付,同样的页面我在个目录下可以用,如
    2个页面都在webapps/webcontent/下就可以,但是放在子目录下就不可以了,如webapps/webcontent/pic/下
      

  3.   

    表单的输入是这样的:
    <input type="file" name="test" value="123"> 
      

  4.   

    首先确定下
    <input type="text" name="test" value="123"> 
    是否在form表单中