I have 10 jsp pages.in each page I am writing a connection class to open and close the result sets...Is there any solution to overcome this??Can I make the connection class in a seperate file(using jsp bean property) and then to instantiate in all my jsp pages passing connection URL,dsn name,User name,password...I am using sql server(query analyser) as a database and jws as web server.. please reply ASAP, Thanks in Advance, Murali
"Excellence is never an accident; it is always the result of high intention, sincere effort, intelligent direction, skillful execution, and the vision to see obstacles as opportunities"
jayram
Ranch Hand
Joined: Oct 30, 2000
Posts: 94
posted
0
i guess u should use connection pool like Poolman or write all your db access logic in a seperate class and only expose a getConnection method of that class to your JSP's
Adam Hardy
Ranch Hand
Joined: Oct 09, 2001
Posts: 564
posted
0
I would use a bean to do all the database stuff and not have a connection object in the jsp scriptlets at all.
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.