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";