Java中的路径问题
- 得到当前工作路径
String workingDir = System.getProperty("user.dir") + "\src\main\webapp\template\expor"
- 得到WEB的根路径
ServletActionContext.getServletContext().getRealPath("/")+ "template/"
String workingDir = System.getProperty("user.dir") + "\src\main\webapp\template\expor"
ServletActionContext.getServletContext().getRealPath("/")+ "template/"
暂无评论。
评论功能维护中,当前仅展示历史评论。