smartupload sl=new smartupload();
sl.getrequest().getParameter("name");
这样就可以了

解决方案 »

  1.   

    楼上说得没有错!sl.getrequest()得到的值就是jsp中request.这样smartupload 和jsp 就可以沟通了。
      

  2.   

    问题解决,结贴
    但还要补充的是smartUpload需要初始化,我又查了很多文章才搞定的,方便一下后来人吧!在页面中的初始化时:
    SmartUpload sl = new SmartUpload();
    sl.initialize(pageContext);
    sl.upload();
    sl.getrequest().getParameter("name");在servlet中初始化时:
    public class user extends HttpServlet {
    private ServletConfig config;
    /**
    * Init the servlet
    */
    final public void init(ServletConfig config) throws ServletException 
             {
    this.config = config;
    }

    final public ServletConfig getServletConfig()
             {
    return config;
    }
     public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
     SmartUpload sl = new SmartUpload();
     sl.initialize(config,request,response);
     try {
          sl.upload();
        }
        catch (ServletException ex) {
        }
        catch (IOException ex) {
        }
        catch (SmartUploadException ex) {
        }
    sl.getrequest().getParameter("name");
     }
    }
    在servlet中初始化不知道能不能简化,不过最少我能运行了!