ITeye博客

java中获得系统路径

fanjava · 2004-11-15 19:06 · Markdown

在Application中:
System.getProperty("user.dir")
在Servlet中:
ServletContext servletContext = config.getServletContext();
String rootPath = servletContext.getRealPath("/");
在jsp中:
application.getRealPath("")

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。