You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by The Duke <mi...@lycos.com> on 2001/10/11 11:27:14 UTC

Testing JDBC Connections???

Does anyone know how I can get to another applications <Context> and <Resource>. 

I'm building a management application for Tomcat 4 and I would like to know this so that I can test a connection to a database (like in JRun). I have a few connections to some MySQL databases with a test application. The connections work in the test application. But when I use the same code to open a connection I get an Exception. 

I have set "crossContext" and "trusted" to true. That didn't help. Does anyone have an idea???



Make a difference, help support the relief efforts in the U.S.
http://clubs.lycos.com/live/events/september11.asp

Re: Testing JDBC Connections???

Posted by paul <pa...@roadrunner.uk.com>.


   ServletContext contextCT  = getServletContext().getContext("/ct/");
   ServletContext contextEDI = getServletContext().getContext("/edi/");
   ServletContext contextWH  = getServletContext().getContext("/wh/");



  so from this context I am able to get to any other context......ie ct,
edi, wh
.

----- Original Message -----
From: "The Duke" <mi...@lycos.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, October 11, 2001 10:27 AM
Subject: Testing JDBC Connections???


> Does anyone know how I can get to another applications <Context> and
<Resource>.
>
> I'm building a management application for Tomcat 4 and I would like to
know this so that I can test a connection to a database (like in JRun). I
have a few connections to some MySQL databases with a test application. The
connections work in the test application. But when I use the same code to
open a connection I get an Exception.
>
> I have set "crossContext" and "trusted" to true. That didn't help. Does
anyone have an idea???
>
>
>
> Make a difference, help support the relief efforts in the U.S.
> http://clubs.lycos.com/live/events/september11.asp
>