?
String pathName = getServletContext().getRealPath("/")+ "doc\\shelian.doc";
E:\项目\.metadata\.me_tcat\webapps\shelian\doc\shelian.doc
?这样的话就可以获取web工程包下面shelian.doc 文件的绝对路径,也就是物理路径了。
日期:2014-05-16 浏览次数:20492 次
String pathName = getServletContext().getRealPath("/")+ "doc\\shelian.doc";
E:\项目\.metadata\.me_tcat\webapps\shelian\doc\shelian.doc
?