I am trying to connect to DB in a servlet using Hibernate.I have read that we can use either hibernate.cfg.xml or hibernate.properties file for configuration of session.For me i
This code will call hibernate.cfg.xml by default:
Configuration configuration = new Configuration().configure();
And this code will call hibernate.properties by default:
Configuration configuration = new Configuration();
Hope it helps.