Finally connected to database through servlet.