Weblogic10中获取资源的实际路径
?
???? 在weblogic10中,servletContext.getRealPath()在默认情况下是不起作用的,需要手工进行设置:
1、进入Weblogic控制台,点击Environment--->Servers--->AdminServer;
2、选择Protocols--->HTTP;
3、将Accept Context Path In Get Real Path属性勾上。
?
1 楼 houzhaowei 2010-06-18 试过了 不行,还是获取不到 我用的是wl10.3 用“System.getProperty("user.dir").replace("\\", "/")” 可获取到项目所在的路径