My app has 2 jsp pages the login page and the main page with multiple tabs in it which is the entire app.
In the main page i have to connect to the database to get the allowed user tabs so i put a jdbc connection method and called it in the constructor of the mainpage ... then i binded each tab's disabled parameter to a variable in the mainpage.java.
Now it works fine when the page loads it gets the allowed tabs and disables the rest.
The problem is that every time i click on a tab or open a panel box inside a tab that method in the constructor is invoked which couses the entire app to crash ... it gives me a PoolLimitSQLException error after going through the components a couple of times.
When i remove it from the constructor everything just runs fine.
Would you please tell me where exactly did i went wrong here and how should i fix it.
Thanks for your time.