mall,
add your connection pool object to the ServletContext like so:
getServletConfig().getServletContext().setAttribute("poolname", pool);
then when you want to get a connection just get a reference to your pool object like so:
PoolObject mypool = (PoolObject)getServletConfig().getServletContext().getAttribute("poolname");
peice of cake! :)
Matt

mall wrote:

Hi, I've just recently read the JSP and Servlet specifications and I was wondering if there was a way to implement a global applicationin tomcat. I want some of my JSP pages to be able to access an object that manages a pool of database-connected-threads. I trieddeclaring such an object as static but it reloads the object whenever the JSP page gets modified. I've also looked at tomcat'sexplaination of some of the elements in server.xml file and it mentioned something about using Requestinterceptors to implementglobal applications but it doesn't say too much after that.  
begin:vcard 
n:Goss;Matt
tel;fax:919-657-1501
tel;work:919-657-1432
x-mozilla-html:FALSE
url:www.rtci.com
org:RTCI;Custom Solutions
adr:;;201 Shannon Oaks Circle;Cary;NC;27511;US
version:2.1
email;internet:[EMAIL PROTECTED]
title:Web Developer
fn:Matt
end:vcard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to