在WebLogic 11的weblogic.xml中可以自定义show-archived-real-path-enabled参数的值,用于使request.getSession().getServletContext().getRealPath("")方法在返回实际路径。
此参数对于打包的(归档的)web应用程序生效,当设置为true时,getRealPath()返回资源对应的实际路径。否则返回null。
<container-descriptor>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>
此参数对于打包的(归档的)web应用程序生效,当设置为true时,getRealPath()返回资源对应的实际路径。否则返回null。