jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject Re: conditional building of Cactus deployments
Date Sat, 03 Nov 2001 10:35:16 GMT


----- Original Message -----
From: "Erik Hatcher" <lists@ehatchersolutions.com>
To: "Cactus Users List" <cactus-user@jakarta.apache.org>
Sent: Friday, November 02, 2001 6:23 PM
Subject: Re: conditional building of Cactus deployments


>
> ----- Original Message -----
> From: "Vincent Massol" <vmassol@octo.com>
>
> > Solution 1 :
> > * Have 2 ant targets : test-junit and test-cactus and just call the one
> you
> > want
>
> Yup, I'm already doing this.  I was mainly looking to see what others were
> doing so that I don't reinvent the wheel.  But I'm perfectly happy coding
it
> all myself - me and Ant are good buddies!  :)
>
> > Solution:
> > * Write an XSL stylesheet that contains the cactus redirectors. Tell me
if
> > you need help (it is very easy if you know XSL)
> > * Use the style ant task to transform your web.xml (production one) into
a
> > web.xml (test one). The condition to perform the style task or not could
> be
> > based either on the target name as in solution 1 above or on the
> definition
> > or not of cactus.include (solution 2 above).
>
> Those are reasonable suggestions, although perhaps a bit overkill for just
> having something commented out or not included in web.xml.  I think the
> filtered copy idea is the best so far.

It's more complex than you imagine ... :)
For example: For each servet definition there is an associated mapping.
However, as you may know, the order of elements in web.xml is important
(servlet definition must come before mappings). So if you have your own
application servlet in one web.xml file and the cactus one in another file,
you need to mix the 2 taking into account the order.

The only way that I know of to do this in a simple way is XSL, which is
exactly meant for this ... If I find some time, I'll write the XSL
stylesheet to do this (quite easy to write).

-Vincent

>
> > > * I do not want duplication in my build.xml
> >
> > euh.. not sure what you mean. all solutions presented here have no
> > duplications
>
> What I was getting at was that I didn't want two different web.xml files,
> and didn't want two <war> tasks (one for production and one for Cactus
> inclusion).  I was just speaking out-loud on that one, I suppose.
>
> > > I'm going to start tackling these issues myself, but if its already
been
> > > implemented nicely then it'd save me some time and I'd be able to
> > contribute
> > > my efforts on the Cactus project in other areas!  :)
> >
> > please do ... :)
>
> ... and I'd get the pleasure of working with Nick again!
>
>     Erik
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:cactus-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:cactus-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message