//Servlet中得到WEB物理相对路径
String uploadDir = getServletContext().getRealPath("/");
本文介绍了一种在Servlet中获取Web应用物理路径的方法。通过使用getServletContext().getRealPath(/), 开发者可以轻松地获取到Web应用的根目录绝对路径。
//Servlet中得到WEB物理相对路径
String uploadDir = getServletContext().getRealPath("/");

被折叠的 条评论
为什么被折叠?