>From: Matt Goss <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: howto implement global applications?
>Date: Fri, 12 Jan 2001 09:41:54 -0500
>
>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.
I will try that but i was under the impression that the servletcontext
would be recreated each time the jsp page was modififed and needed to be
recompiled.
Thank you for your reply.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]