se工程xml配置文件放在src下像代码中这样读就可以了,在web里就不行了
该怎么读呢,xml文件最好放哪儿呢private IConnectionPool() {
/*SAXReader reader = new SAXReader();
Document doc = null;
try {
File f=new File("/vo.xml");
doc = reader.read(f);
} catch (DocumentException e) {
e.printStackTrace();
}
Element root = doc.getRootElement();
Iterator<Element> ite = root.elementIterator("DataSource");
Element e = ite.next();*/
this.driver="oracle.jdbc.driver.OracleDriver";
this.url="jdbc:oracle:thin:@127.0.0.1:1521:orcl";
this.userName="scott";
this.pwd="tiger";
this.maxConnections=150;
this.initalConnection=12;
this.incrementConnections=5;
xml Web