You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bill Lynch <bi...@gmail.com> on 2005/02/22 23:08:50 UTC

Merge webapp doc roots

All,

I'm developing a webapp and for various reasons it has multiple
document roots which can override each other. For example, c:\webapp
is one directory, but c:\webapp-editionA and c:\webapp-editionB are
other editions of the same application. There are a base set of JSPs
in the 'webapp' directory and some of those are overridden in the
'edition' directories. I do my development in different modes -- so if
I'm developing the webapp for edition A I'll need the jsp's from the
base directory plus those in the A directory.

Resin has a new "merge()" function which will merge together different
doc roots for a webapp:

<web-app id="/foo"
document-directory="merge:(c:\webapp;c:\webapp-editionA);" .. />

This means everything in webapp-editionA will override what's in
webapp. I do this right now and it works perfectly for development.

My question is -- is this possible in Tomcat? I'd like to use Tomcat
for more dev, mostly because of it's blazing fast JSP compilation in
5.5 (very impressive BTW!).

Thanks in advance,
--Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Merge webapp doc roots

Posted by Bill Lynch <bi...@gmail.com>.
QM,

Yes, I could definitely do that but the nice thing now is that I don't
need to use a build process to copy & merge so it's nice and fast.

Thanks anyway,
--Bill

On Tue, 22 Feb 2005 19:12:23 -0600, QM <qm...@brandxdev.net> wrote:
> On Tue, Feb 22, 2005 at 02:08:50PM -0800, Bill Lynch wrote:
> : Resin has a new "merge()" function which will merge together different
> : doc roots for a webapp:
> :  [snip]
> : <web-app id="/foo"
> : document-directory="merge:(c:\webapp;c:\webapp-editionA);" .. />
> :
> : This means everything in webapp-editionA will override what's in
> : webapp. I do this right now and it works perfectly for development.
> :
> : My question is -- is this possible in Tomcat?
> 
> To my knowledge, no, this is not possible using Tomcat alone.  Tomcat
> expects a standard webapp (that is, either wrapped in a WAR file or in
> exploded-dir format).
> 
> You can achieve what you're after by moving the merge into your build
> process -- that is, have Ant (or whatever you use) create the dir/WAR by
> copying all of those webapps to it (that is, copy them over one
> another).
> 
> -QM

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Merge webapp doc roots

Posted by QM <qm...@brandxdev.net>.
On Tue, Feb 22, 2005 at 02:08:50PM -0800, Bill Lynch wrote:
: Resin has a new "merge()" function which will merge together different
: doc roots for a webapp:
:  [snip]
: <web-app id="/foo"
: document-directory="merge:(c:\webapp;c:\webapp-editionA);" .. />
: 
: This means everything in webapp-editionA will override what's in
: webapp. I do this right now and it works perfectly for development.
: 
: My question is -- is this possible in Tomcat?


To my knowledge, no, this is not possible using Tomcat alone.  Tomcat
expects a standard webapp (that is, either wrapped in a WAR file or in
exploded-dir format).

You can achieve what you're after by moving the merge into your build
process -- that is, have Ant (or whatever you use) create the dir/WAR by
copying all of those webapps to it (that is, copy them over one
another).

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org