Hi,
I am trying to write a web-app using
servlets (using "Java Servlets Developer's guide" by Karl Moss as a reference).
I have created my connection pool, established a connection, logged myself and moved on into my app.
My question deals with the creating and closing of the connections... In the example in the book the application is a one servlet class app (a login screen) and the connection, statment and resultset are created on doGet(), information is shown and then the these objects are all closed.
If I move past the login screen in my application, should i close the connection and then re-open it?!? seems like overkill - or can i assign my
jdbc connection to the session?
What is the correct way to handle a connection between multiple screens. Think Im going to do some more reading, but any advice is appreciated.
Thanks,
Chris