jsp编译后运行期错误,好像是路径错误,请帖出原代码,再看一看

解决方案 »

  1.   

    <body>
      <center>正在上传文件...<%//上载附件mySmartUpload.initialize(pageContext); 
    mySmartUpload.service(request,response); 
    mySmartUpload.upload(); 
    String fn=fn=mySmartUpload.getFiles().getFile(0).getFileName();
    mySmartUpload.save("upload/");//文件保存的目录为upload
    out.println("已经成功上传了文件,请查看<a href=upload/"+fn+">这里</a>,看文件是否上传成功");
    %>
    <a href=FileUpload.html>重新上传</a>
    </body>
      

  2.   

    上面是原代码啊  谁看看 哪里错了 ? 我有upload  文件夹的
      

  3.   

    这句:
    mySmartUpload.save("upload/");//
    错了,你看看下面的吧,同时上传多个附件的: SmartUpload su=new SmartUpload();//
    su.initialize(pageContext);
    su.setMaxFileSize(100000000);
    su.upload(); for (i=0;i<su.getFiles().getCount();i++){
    com.jspsmart.upload.File file = su.getFiles().getFile(i);
    String FILENAME=file.getFileName();
    if (!file.isMissing()) {
    imagePath[i]="/upload/"+FILENAME;
    file.saveAs(imagePath[i],su.SAVE_VIRTUAL);
    }
    }