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

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

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

猜你喜欢

转载自bbwang8088.iteye.com/blog/2368558
今日推荐