在Application中:
System.getProperty("user.dir")
在Servlet中:
ServletContext servletContext = config.getServletContext();
String rootPath = servletContext.getRealPath("/");
在jsp中:
application.getRealPath("")
相关文章:
-
2022-12-23
-
2022-02-07
-
2021-11-30
-
2021-12-10
-
2021-12-19
-
2021-11-27
-
2022-12-23
猜你喜欢
-
2021-12-19
-
2021-07-29
-
2021-11-18
-
2021-05-05
-
2022-12-23
-
2022-12-23
相关资源
-
下载
2021-06-05
-
下载
2021-06-05
-
下载
2023-01-24