`
隐形的翅膀
  • 浏览: 483565 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Java中的路径问题

 
阅读更多
1. 得到当前工作路径

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

2. 得到WEB的根路径

ServletActionContext.getServletContext().getRealPath("/")+ "template/"
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics