I am literally new to JSF and web Dev.
I am creating a website that interact with a database. I have understood how to display the data from a table but currently I am creating a new connection everytime I change the table to display.
Isn't it better to create the connection at the beginning and close it at the end ?
How should I share the connection informations between the different classes that are using it to query the DB ?