把tex_filedesc中的下划线去掉试试

解决方案 »

  1.   

    <form action="upload_result.jsp"name="form1" method="post" enctype="multipart/form-data">
    <input name="title" type="text" class="Common" id="title" size="50">
    <input name="file" type="file" id="file"  class="Common">
    <textarea name="content" class="Common" style="height:60px;width:500px"></textarea>
    </form>
    <%@ page contentType="text/html; charset=gb2312" %>
    <%@ page import="cn.com.jspsmart.upload.*"%>
    <%
    String file=mySmartUpload.getRequest().getParameter("file");
    String title=mySmartUpload.getRequest().getParameter("title");
    String content=mySmartUpload.getRequest().getParameter("content");
      File f;
     for (int i=0;i<fs.getCount();i++){
     f=fs.getFile(i);
     String path="/xxfb/";   if (f.getFileName().length()>0){
          if(i==0){
              String filenamef.getFileName().substring(f.getFileName().lastIndexOf("."),f.getFileName().length());
              f.saveAs(path+filename); 
          tp=filename;
                }
       }
     }
    if(file==null){
    file="null";
    }
    %>
      

  2.   

    还是不行!
    to  jyy7751(wish i could fly):
    你的代码基本和我的一致,我按你写了。还是不行。并且
    String file=mySmartUpload.getRequest().getParameter("file");是通不过的。
      

  3.   

    f  form 中有 enctype="multipart/form-data" 吗?