ITeye博客

Java中的路径问题

隐形的翅膀 · 2014-12-26 15:51 · Java基础 · 编程语言 · Markdown

  1. 得到当前工作路径

String workingDir = System.getProperty("user.dir") + "\src\main\webapp\template\expor"

  1. 得到WEB的根路径

ServletActionContext.getServletContext().getRealPath("/")+ "template/"

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。