The best way of doing this is to use a connection pool. In this way you can create a pool of connections when your server starts, get connections from this pool when you need and return this to the pool when you are finished. Another way to use your connection across your application is to put your connection to the Application or Session objects provided by your web server. Java Servlet API has methods that you can use to access session objects.
Related links:
http://www.es-strangnas.se/iasdocs/aspdocs/ref/comp/compref_13.htm
http://www.javaexchange.com/api/com.javaexchange.dbConnectionBroker.DbConnectionBroker.html
-----Original Message-----
From: Baris EFE [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, January 12, 2000 4:58 PM
To: [EMAIL PROTECTED]
Subject: Connection pass from servlet to servlet
Hi,
I have a servlet with html output some of them have link to another servlet.
I want to use connection object from other servlet not to open another
connection to DB. What is(or are) the way of doing it?
Thanks!!
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
