1. request.getRealPath("url");//虚拟目录映射为实际目录
  2. request.getRealPath("./");//网页所在的目录
  3. request.getRealPath("../");//网页所在目录的上一层目录
  4. 假定你的web application(web应用)名称为news,你的浏览器中输入请求路径:http://localhost:8080/uploading/load.jsp
  5. request.getContextPath()  =>  /uploading
  6. request.getServletPath()  =>  /load.jsp
  7. request.getRequestURL()  =>  http://localhost:8080/uploading/load.jsp
  8. request.getRealPath("/")  =>   F:\learn\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\uploading\
  9. 现在request.getRealPath("/") 这个方法已经不推荐使用了
  10. 可以使用
  11. ServletContext.getRealPath(java.lang.String)  instead.
  12. request.getSession().getServletContext().getRealPath() 得到工程文件的实际物理路径,也就是绝对地址