给你一段代码参考吧,有问题再说,你自己再修改一下save里面函数体,来实现数量    public int save(String s,int i) throws ServletException,IOException,SmartUploadException
    {
        int j = 0;
        if(s == null)
        {
            s = m_application.getRealPath("/");
            //System.out.println("s == null,m_application.getRealPath:" + s);
        }
        if(s.indexOf("/") != -1)
        {
            if(s.charAt(s.length() - 1) != '/')
            {
                s = s + "/";
                //System.out.println("m_application.getRealPath::" + s);
            }
        }
        else
        {
            if(s.charAt(s.length() - 1) != '\\')
            {
                s = s + "\\";
                //System.out.println("m_application.getRealPath" + s);
            }
        }
        //System.out.println("m_application.getRealPath:::" + s);
        FileNames = new String[m_files.getCount()];
        for(int k = 0;k < m_files.getCount();k++)
        {
            if(!m_files.getFile(k).isMissing())
            {
                //System.out.println("s + m_files.getFile(k).getFileName():" + s + m_files.getFile(k).getFileName());
                m_files.getFile(k).saveAs(s + m_files.getFile(k).getFileName(),i);
                FileNames[j] = s + m_files.getFile(k).getFileName();
                j++;
            }
        }        return j;
    }    //Add
    private String[] FileNames;
    public String[] getFileNames()
    {
        //Method may expose internal representation by returning array
        //Returning an array value stored in one of the object's fields exposes the internal representation of the object.? For classes shared by other untrusted classes, this could potentially be a security issue.? Returning a new copy of the array is better approach in many situations.
        String[] vFileNames = new String[FileNames.length];
        System.arraycopy(FileNames,0,vFileNames,0,FileNames.length);
        return vFileNames;
    }