在 action 的 java 里面获得应用 WEB-INF 下面的文件的路径方法

来源:互联网 发布:hl 线切割 软件 编辑:程序博客网 时间:2024/06/01 10:04

 

String contextRoot = getServletContext().getRealPath("/");
String fileSeparator = System.getProperty("file.separator");
String path= contextRoot + fileSeparator + "WEB-INF" + fileSeparator + "aaa.xml";

原创粉丝点击