如何得到WEB-INF下的xml文件
WebRoot
---WEB-INF
---reqXml
---cust.xml
写一个java类、怎么得到cust.xml文件?
[解决办法]
- Java code
String propsFile =Test.class.getResource("/").toString().replace("file:", ""); propsFile = propsFile.substring(0,propsFile.indexOf("WEB-INF"))+"WEB-INF/cust.xml";