Java Path 问题(二)
摘要:
1 /** 2 * 对于 J2EE,可以使用 ServletContext.getResource,她根据相对路径获得绝对路径的 URL 3 * 相对路径以 ContextPath 为第一参考路径,以 /WEB-INF/lib 中 Jar 包的 /META-INF/resources 为第二参考路径 4 * 相对路径必须以 “/” 开头 5 */ 6 ServletContext.getResource 7 /** 8 * ServletContext.getRealPath 不推荐使用 9 */10 ServletContext.getRealPath 阅读全文
posted @ 2011-11-22 15:48 magicboylinw 阅读(182) 评论(0) 推荐(0)
浙公网安备 33010602011771号