tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hassan Schroeder <>
Subject Re: Different JDBC sources?
Date Tue, 13 Sep 2005 21:35:27 GMT
Vsevolod (Simon) Ilyushchenko wrote:

>> Presumably these are two different Contexts; put the appropriate
>> Resource in each ${context}.xml file...

> Thanks! How will different contexts be invoked depending on the URL?

Well, maybe I misunderstood the original question :-)

My presumption was that the same code exists at, say,   and
which are clearly different Contexts, even if they're on the same
machine being run as virtual hosts.

So each Context has a Resource addressing the appropriate DB.

> Also, I need to distinguish between the test and production environment 
> in the code to figure out whether emails should be sent or not. Can I 
> detect the current context there?

If your setup is as described above, you could use getServerName();
alternatively, put a Parameter in the Context to turn on/off email

Apologies if this isn't relevant to your environment, though!

Hassan Schroeder -----------------------------
Webtuitive Design ===  (+1) 408-938-0567   ===

                           dream.  code.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message