Here is what is in my JSP:
I get data from the bean and then post it on the webpage. I pass an array list as which is erroring as it is saying its empty(when its not if it queried the database). The arraylist is full of years and all i do is sort them so that i can display them as headers in the JSP, like this
That is achieved via a for loop that just counts downwards from the highest value in the arraylist to the lowest value in the arraylist. I have tried just the single connection approach as i was advised to go for by my brother, then this came up so I said I was moving the application to connection pooling. I think that it opens a connection the first time in the pool then the JSP loading fails, next time as that connection is already open it is ok to retrieve the data from the database.
To correct anusha
it will be opened once and the connection will be available at the application level till the server shut downs
Mysql has a default time out on connections of 8 hours then it will close all connections if not in use.
If you need anything else let me know.