Loading

JSP获取绝对物理地址

session.getServletContext().getRealPath("");

但是 getRealPath("a"+File.separator);出来的结果是没有最后一个File.separator的;

getRealPath方法给去掉了;如果需要增加最后一个File.separator,自己得到路径之后

再增加:path = path + File.separator;

posted @ 2015-09-04 09:13  stono  阅读(283)  评论(0编辑  收藏  举报