0

当我尝试在我的项目中获取当前目录的路径时,它给出了下载 Eclipse 的位置。

String Cuurentdir= System.getProperty("user.dir");

我想要我的项目目录的路径。

注意 - 使用 tomcat 作为服务器。

4

1 回答 1

0

String workingDir = (File)servletContext.getAttribute(ServletContext.TEMPDIR);

于 2020-07-28T10:33:34.457 回答