你根本就没用到formfile么 好象

解决方案 »

  1.   

    if(file.exists()){     //文件已经存在
    System.out.println("file   is   exist!!!");
    file.delete();
    System.out.println("file   is   delete");
    }else{
    System.out.println("file   is   not   exist!!!");
      

  2.   

    File file=new File(fileURL);  if(file.exists()){  //文件已经存在 
    System.out.println("file is exist!!!"); 
    file.delete(); 
    System.out.println("file is delete"); 
    }else{ 
    System.out.println("file is not exist!!!"); 

    很明显,你的程序流程不对,按照你的语句,最后的结果只能是null。
      

  3.   

    新建对象
    DoUserproForm doUserproForm = new DoUserproForm();
    使用对象
    FormFile userFace=doUserproForm.getFile(); System.out.println(userFace);
    我只见过
    DoUserproForm doUserproForm = (DoUserproForm)form;我在搞上传也遇到了问题,在myeclipse里面的outline窗口里面打开EDIT我上传的FORMBEAN,里面的属性并找不到FormFile的对象,我并不清楚struts1.2支不支持FormFile
    同样被上传折磨的某菜飘过