当前位置: 代码迷 >> J2EE >> 文件下载时分 系统找不到指定的路径
  详细解决方案

文件下载时分 系统找不到指定的路径

热度:46   发布时间:2016-04-21 21:59:41.0
文件下载时候 系统找不到指定的路径。


String file =  ServletActionContext.getServletContext().getRealPath("/WebRoot/excel");

        FileOutputStream out = new FileOutputStream(file+"/client.xls");
        wb.write(out);
        out.close();


HTTP Status 500 - E:\apache-tomcat-6.0.37\webapps\logistics\WebRoot\excel\client.xls (系统找不到指定的路径。)

type Exception report

message E:\apache-tomcat-6.0.37\webapps\logistics\WebRoot\excel\client.xls (系统找不到指定的路径。)

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.io.FileNotFoundException: E:\apache-tomcat-6.0.37\webapps\logistics\WebRoot\excel\client.xls (系统找不到指定的路径。)




------解决方案--------------------
你的excel文件夹里面不像有文件的样子啊
  相关解决方案