yes, that is similar to what I do("" is different for each and /mycontext is
shared).

no there is no way to have it look in common if it is not in local. you will
have to know where it is for includes and forwards. For new requests, you
could write a filter to trap a 404 and redirect to common.

keep in mind that your root context will have a different instances of the
same code. This also applies to statics and synchronized objects too unless
they reside in /tomcat/common/lib.

Charlie

> -----Original Message-----
> From: Turoff, Steve [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 2:47 PM
> To: Tomcat Users List
> Subject: RE: Possible to subclass a web application?
> 
> 
> Charlie,
> 
> I want to make sure I'm understanding your suggestion. I 
> would do something like this in server.xml:
> 
> <Host name="www.siteA.com">
>       <!-- Common Context - These files are shared between 
> all domains -->
>         <Context path="" docBase="common" debug="0" 
> reloadable="true"/>
>          
>       <!-- Local Context  - These files are specific to this 
> domain -->
>         <Context path="/local" docBase="siteA" debug="0" 
> reloadable="true"/>
> </Host>
> 
> <Host name="www.siteB.com">
>       <!-- Common Context - These files are shared between 
> all domains -->
>         <Context path="" docBase="common" debug="0" 
> reloadable="true"/>
>          
>       <!-- Local Context  - These files are specific to this 
> domain -->
>         <Context path="/local" docBase="siteB" debug="0" 
> reloadable="true"/>
> </Host>
> 
> Is this what you meant? Is there anyway to have Tomcat 
> automaticaly look for a file in the Common Context if it 
> doesn't find it in the Local Context?
> 
> Thanks,
> Steve
> 
> > -----Original Message-----
> > From: Cox, Charlie [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 18, 2002 8:31 AM
> > To: 'Tomcat Users List'
> > Subject: RE: Possible to subclass a web application?
> > 
> > 
> > Put all yout common code in one context, make a context 
> > available for it in
> > each virtual host. Then create a context-specific 
> > directory(named the same
> > in all hosts) that contains header.jsp,etc that are specific 
> > to each host.
> > 
> > Charlie
> > 
> > > -----Original Message-----
> > > From: Turoff, Steve [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, November 15, 2002 4:52 PM
> > > To: Tomcat Users List
> > > Subject: RE: Possible to subclass a web application?
> > > 
> > > 
> > > Cees,
> > > 
> > > Thanks for the advice. I thought about doing it your way, 
> > > however there will actually be 4 or 5 sites, some of which 
> > > will override more than just header.jsp and footer.jsp. I 
> > > think this will lead to a maintenance nightmare down the 
> > > road. Plus, I like the idea of being able to add new content 
> > > to siteB, which wouldn't exist in siteA. 
> > > 
> > > I worked for a company several years ago and we did this 
> > > using Dynamo, which is why I thought Tomcat might be able to 
> > > handle it, too. Unfortunately, I wasn't privy to the 
> configuration.
> > > 
> > > Steve
> > > 
> > > > -----Original Message-----
> > > > From: Cees van de Griend [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, November 15, 2002 3:48 PM
> > > > To: Tomcat Users List; Turoff, Steve
> > > > Subject: Re: Possible to subclass a web application?
> > > > 
> > > > 
> > > > On Friday 15 November 2002 22:17, Turoff, Steve wrote:
> > > > > I currently have a Tomcat (v 3.2.3) - Apache (v 1.3.19) - 
> > > > Red-Hat web site,
> > > > > www.siteA.com, that consists of several hundred jsp pages 
> > > > and several
> > > > > servlets. I want to create a second web site, 
> > > > www.siteB.com, that uses the
> > > > > same content, but has a different look-and-feel. 
> > > > 
> > > > Use <alias> inside your server.xml <host> part to point the 
> > > > two domains to the
> > > > same webapp.
> > > > Use request.getServerName() in your JSP files to point to a 
> > > > different CSS 
> > > > file.
> > > > 
> > > > Regards,
> > > > Cees.
> > > > 
> > > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> > --
> > To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>



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

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

Reply via email to