【发布时间】:2021-05-19 14:55:28
【问题描述】:
我不明白为什么 fi.exists() 在这里返回 false。我可以通过contextPath+"/images/default.png的浏览器浏览到文件
String contextPath = req.getContextPath();
File fi = new File(contextPath+"/images/default.png");
exists = fi.exists();
【问题讨论】:
标签: java servlets filenotfoundexception webcontext