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

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

posted on 2009-03-18 20:29  意扬  阅读(927)  评论(0)    收藏  举报

导航