request.getParameter( "fileName");    
取得应该就是带路径的啊
 

解决方案 »

  1.   

    String filename = request.getParameter( "fileName");   
    File file = new File(filename );
    if(file.exists){
    String filepath = file.getAbsolutePath()}
      

  2.   

    D:\apache-tomcat-6.0.35\bin\excel.xls 
    也不行。File file = new File(filename );
      

  3.   

    不知道想知道客户端这个文件存在什么路径有啥用处?根据 RFC 2626 文件上传文件,在 RFC 2388 明确地规定 Content-Disposition 头中的 filename 参数是一个文件名这是客户端的隐私,浏览器会保护的,所以别想了
      

  4.   

    看了一下,是String realPath = request.getSession().getServletContext().getRealPath("upload");这样可以获取真是路径
      

  5.   

    建议用apache的fileupload上传附件
      

  6.   

    你要那里路径干嘛,你只是需要拿到文件点击上传,将文件保存到你指定的服务器或者路径下面就可以了。
    <form id="form3" action="" method="post" enctype="multipart/form-data" >