首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

java或者web中解决所有的路径有关问题

2012-10-09 
java或者web中解决所有的路径问题.File f new File(com/test.java) String path this.getServletCont

java或者web中解决所有的路径问题.
File f = new File(com/test.java); String path = this.getServletContext().getRealPath("/"); Properties p = new Properties(); p.load(new FileInputStream(new File(path.substring(0,(path.lastIndexOf("\\WebRoot") + 1)) + "doc/db.properties"))); System.out.println(p.getProperty("driverName")); http://tmsoft.lsxy.com/trackback.php?tbID=949&extra=5cc5d5

热点排行