Currently I am opening ,then reading a simple odbc:
jdbc db then formatting to html and finally closing the db from my
servlet each time a connection is made to my servlet.
I know this is not efficent as opening the DB each time costs me 2 seconds and then reformatting another 2 seconds. What I would like to do is use persistance and have to avoid all this. But each time display the correct most up to data from the DB.
So how do I use persistancy?
Most importantly how do I keep my DB connection open, and avoid having to re-open, close ... between each new page access?
Would I have to read the DB to a structure (say a vector) and then if the DB has changed (how do I figure this out?) re-read to the vector.