On Sun, 14 Jul 2002, August Detlefsen wrote:

> Date: Sun, 14 Jul 2002 23:15:53 -0700 (PDT)
> From: August Detlefsen <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
>      [EMAIL PROTECTED]
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Cobranding - Share Controller, Split View
>
> I am currently developing several cobranded sites that share the same
> functionality. I want to be able to share the same set of servlets
> across multiple cobrands.
>
> I know I can treat the servlets as a separate webapp and deploy them to
> each separate host, but if I do this, will they be able to access the
> different configuration ( <context-param> and JNDI resources )
> specified in the each ROOT context's web.xml?
>

One way to do this in Tomcat 4.1.x is to take advantage of the
<ResourceLink> element.  Basically, you define the resources you want to
share once in the <GlobalNamingResources> section of server.xml, and then
embed a <ResourceLink> for each resource in the <Context> element for the
various webapps.  From the point of view of the application, it just looks
like a normal application resource -- the app doesn't know that it is
actually getting resolved to the underlying shared resource by a link.

This is very handy when you use the global resources to establish all the
default behavior, then override just the resources a particular app needs
to customize that app.  The app itself thinks of all resources as being
local, so it doesn't need to be modified to look two different places.

> -August
>

Craig


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

Reply via email to