ITeye博客

Tomcat下获取web应用的绝对路径

bbwang8088 · 2017-04-11 10:40 · 编程语言 · Markdown

String tomcatRoot = request.getSession().getServletContext().getRealPath("/");  

 可以获取到"%tomcat_root%\%web_app_name%\"的绝对路径

评论(0)

暂无评论。

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