日期:2014-05-18  浏览次数:20608 次

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


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文件夹里面不像有文件的样子啊