----- Original Message -----
From: "Brian Moynihan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 08, 2002 11:15 AM
Subject: Can Database connection be maintained between servlets ...
> Hi there,
>
> Does anyone know how to maintain a database connection between servlets:
>
=== Set Connection servlet1.java
Connection connection = DriverManager.getConnection(...);
getServletContext().setAttribute("connection", connection);
===
=== get Connection servlet22.java
Connection connection =
(Connection)getServletContext().getAttribute("connection");
===
=== get from Jsp test.jsp
<%
Connection connection =
(Connection)application.getAttribute("connection");
%>
Yuriy
___________________________________________________________________________
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