try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
InputStream flie = this.getClass().getResourceAsStream(
"WEB-INF/sac-price.xml");
Document doc = db.parse(flie);
} catch (Exception e) {
System.out.println(e.getMessage());
throw e;
}
catch抓住的错误是:InputStream cannot be null
检查了WEB-INF下面存在sac-price.xml
请问高手这是为啥????
也请教更好的方法。。。
------解决方案--------------------
没人知道么?