获取Tomcat服务器目录

String realPath = request.getSession().getServletContext().getRealPath("/");
结果如下:E:\javatool\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\XXXVideoApp\

猜你喜欢

转载自blog.csdn.net/qq_39822451/article/details/86133807