①Create 2 folders under the WEB-INF file --------------classes+lib (as follows)
② Paste our database connection file in lib
③file---project--structure
④module-----dependencies---+----- (select the database connection file we just pasted in)
Click ok----and then click apply----and then click ok----so that our database connection has been configured.