Weblogic war包部署時獲取Web根目錄問題

在Weblogic當中若是以war包方式部署則不能用request.getRealPath(「/」)獲取web根目錄,java this.getClass().getClassLoader().getResource("/").getPath()便可獲取: /** * 獲取web目錄,Weblogic 默認以war包部署的時候不能用getRealPath * getResource("/")獲
相關文章
相關標籤/搜索