Joined: Wed Jan 19, 2011 11:01 am Posts: 4
|
hey everyone.
i need to get the connection from a datasource defined in a bean in applicationContext.xml, but i am having problem accessing the file. I tried: 1) Configuration conf = new Configuration(); SessionFactory session = conf.configure().buildSessionFactory(); but it says it doesnt find hibernate.cfg.xml
2) ApplicationContext ctx = new FileSystemXmlApplicationContext("applicationContext.xml"); ComboPooledDataSource ds = (ComboPooledDataSource) ctx.getBean("ds"); but it doesnt find too :(( i changed to WEB-INF/applicationContext and does the same error. Can anybody help me? Need a bean of applicationContext.xml!!!
i have this structure of code inside my proj: -src ---conf ---java -----controllers --------MainContr -web ---META-INF ---WEB-INF -----applicationContext.xml -----dispatcher-servlet.xml -----hibernate.cfg.xml -----web.xml
thnx for trying to help me
|
|