java中获取系统路径的方法
在Application中:?
System.getProperty("user.dir")?
在Servlet中:?
ServletContext servletContext = config.getServletContext();?
String rootPath = servletContext.getRealPath("/");?
在jsp中:?
application.getRealPath("")
发布时间: 2012-10-30 16:13:36 作者: rapoo
java中获取系统路径的方法
在Application中:?
System.getProperty("user.dir")?
在Servlet中:?
ServletContext servletContext = config.getServletContext();?
String rootPath = servletContext.getRealPath("/");?
在jsp中:?
application.getRealPath("")