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,
    http://dev.example.com/   and   http://www.example.com
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
sending.

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

--
Hassan Schroeder ----------------------------- [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                          dream.  code.



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

Reply via email to