日期:2014-05-16  浏览次数:20367 次

jsp 中 文件的路径问题
?
String pathName = getServletContext().getRealPath("/")+ "doc\\shelian.doc";


E:\项目\.metadata\.me_tcat\webapps\shelian\doc\shelian.doc
?
这样的话就可以获取web工程包下面shelian.doc 文件的绝对路径,也就是物理路径了。