java中如何获得系统路径!(项目的路径)

Application中:
System.getProperty("user.dir")
在Servlet中:
ServletContext servletContext = config.getServletContext();
String rootPath = servletContext.getRealPath("/");
jsp中:
application.getRealPath("")
原文地址:https://www.cnblogs.com/gyxdbk/p/1415808.html