You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Vincent Massol <vm...@octo.com> on 2002/11/12 12:07:15 UTC

[Q] How to merge 2 web.xml files?

Hi,

I would like to merge 2 web.xml files programmatically and generate a
new web.xml. Do you know if there's some library or code that already
does this? 

I know Tomcat has a global web.xml. Is there some code I could use from
Tomcat?

Does anyone has a DVSL/XSL/other stylesheet for making this
transformation?

Thanks a lot
-Vincent


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [Q] How to merge 2 web.xml files?

Posted by Martin van den Bemt <ml...@mvdb.net>.
afaik jelly already supports betwixt and you can get something from the
tomcat code to setup the beans ? (afaik Digester is used by tomcat for
that purpose, although I never checked it..).

How the jelly stuff works I don't have a clue, though probably james S.
knows..

Mvgr,
Martin

On Tue, 2002-11-12 at 13:01, Vincent Massol wrote:
> Hi Martin,
> 
> Yes, that's one solution but I would like, if possible, something that
> already has the logic to merge web.xml file... :-)
> 
> Also, it would be great if it is already packaged as an Ant task, a
> jelly script, a XSL or DVSL script, etc.... ;-)
> 
> Am I asking for too much? :-)
> 
> Thanks
> -Vincent
> 
> > -----Original Message-----
> > From: Martin van den Bemt [mailto:mllist@mvdb.net]
> > Sent: 12 November 2002 11:13
> > To: Jakarta Commons Developers List
> > Subject: Re: [Q] How to merge 2 web.xml files?
> > 
> > use betwixt ?
> > 
> > Mvgr,
> > Martin
> > 
> > On Tue, 2002-11-12 at 12:07, Vincent Massol wrote:
> > > Hi,
> > >
> > > I would like to merge 2 web.xml files programmatically and generate
> a
> > > new web.xml. Do you know if there's some library or code that
> already
> > > does this?
> > >
> > > I know Tomcat has a global web.xml. Is there some code I could use
> from
> > > Tomcat?
> > >
> > > Does anyone has a DVSL/XSL/other stylesheet for making this
> > > transformation?
> > >
> > > Thanks a lot
> > > -Vincent
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:   <mailto:commons-dev-
> > unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail: <mailto:commons-dev-
> > help@jakarta.apache.org>
> > >
> > >
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:commons-dev-
> > unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:commons-dev-
> > help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [Q] How to merge 2 web.xml files?

Posted by Vincent Massol <vm...@octo.com>.
Thanks Nicola,

That's exactly what I was looking for! :-)

Cheers,
-Vincent

> -----Original Message-----
> From: Nicola Ken Barozzi [mailto:nicolaken@apache.org]
> Sent: 12 November 2002 13:08
> To: Jakarta Commons Developers List
> Subject: Re: [Q] How to merge 2 web.xml files?
> 
> 
> 
> Vincent Massol wrote:
> > Hi Martin,
> >
> > Yes, that's one solution but I would like, if possible, something
that
> > already has the logic to merge web.xml file... :-)
> >
> > Also, it would be great if it is already packaged as an Ant task, a
> > jelly script, a XSL or DVSL script, etc.... ;-)
> >
> > Am I asking for too much? :-)
> 
> In XSLT
> 
>   http://www.informatik.hu-berlin.de/~obecker/XSLT/#merge
> or
>   http://wwbota.free.fr/XSLT_models/append.xslt
> 
> > Thanks
> > -Vincent
> >
> >
> >>-----Original Message-----
> >>From: Martin van den Bemt [mailto:mllist@mvdb.net]
> >>Sent: 12 November 2002 11:13
> >>To: Jakarta Commons Developers List
> >>Subject: Re: [Q] How to merge 2 web.xml files?
> >>
> >>use betwixt ?
> >>
> >>Mvgr,
> >>Martin
> >>
> >>On Tue, 2002-11-12 at 12:07, Vincent Massol wrote:
> >>
> >>>Hi,
> >>>
> >>>I would like to merge 2 web.xml files programmatically and generate
> >>
> > a
> >
> >>>new web.xml. Do you know if there's some library or code that
> >>
> > already
> >
> >>>does this?
> >>>
> >>>I know Tomcat has a global web.xml. Is there some code I could use
> >>
> > from
> >
> >>>Tomcat?
> >>>
> >>>Does anyone has a DVSL/XSL/other stylesheet for making this
> >>>transformation?
> >>>
> >>>Thanks a lot
> >>>-Vincent
> >>>
> >>>
> >>>--
> >>>To unsubscribe, e-mail:   <mailto:commons-dev-
> >>
> >>unsubscribe@jakarta.apache.org>
> >>
> >>>For additional commands, e-mail: <mailto:commons-dev-
> >>
> >>help@jakarta.apache.org>
> >>
> >>>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <mailto:commons-dev-
> >>unsubscribe@jakarta.apache.org>
> >>For additional commands, e-mail: <mailto:commons-dev-
> >>help@jakarta.apache.org>
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:   <mailto:commons-dev-
> unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:commons-dev-
> help@jakarta.apache.org>
> >
> >
> >
> 
> --
> Nicola Ken Barozzi                   nicolaken@apache.org
>              - verba volant, scripta manent -
>     (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Q] How to merge 2 web.xml files?

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Vincent Massol wrote:
> Hi Martin,
> 
> Yes, that's one solution but I would like, if possible, something that
> already has the logic to merge web.xml file... :-)
> 
> Also, it would be great if it is already packaged as an Ant task, a
> jelly script, a XSL or DVSL script, etc.... ;-)
> 
> Am I asking for too much? :-)

In XSLT

  http://www.informatik.hu-berlin.de/~obecker/XSLT/#merge
or
  http://wwbota.free.fr/XSLT_models/append.xslt

> Thanks
> -Vincent
> 
> 
>>-----Original Message-----
>>From: Martin van den Bemt [mailto:mllist@mvdb.net]
>>Sent: 12 November 2002 11:13
>>To: Jakarta Commons Developers List
>>Subject: Re: [Q] How to merge 2 web.xml files?
>>
>>use betwixt ?
>>
>>Mvgr,
>>Martin
>>
>>On Tue, 2002-11-12 at 12:07, Vincent Massol wrote:
>>
>>>Hi,
>>>
>>>I would like to merge 2 web.xml files programmatically and generate
>>
> a
> 
>>>new web.xml. Do you know if there's some library or code that
>>
> already
> 
>>>does this?
>>>
>>>I know Tomcat has a global web.xml. Is there some code I could use
>>
> from
> 
>>>Tomcat?
>>>
>>>Does anyone has a DVSL/XSL/other stylesheet for making this
>>>transformation?
>>>
>>>Thanks a lot
>>>-Vincent
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:   <mailto:commons-dev-
>>
>>unsubscribe@jakarta.apache.org>
>>
>>>For additional commands, e-mail: <mailto:commons-dev-
>>
>>help@jakarta.apache.org>
>>
>>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <mailto:commons-dev-
>>unsubscribe@jakarta.apache.org>
>>For additional commands, e-mail: <mailto:commons-dev-
>>help@jakarta.apache.org>
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [Q] How to merge 2 web.xml files?

Posted by Vincent Massol <vm...@octo.com>.
Hi Martin,

Yes, that's one solution but I would like, if possible, something that
already has the logic to merge web.xml file... :-)

Also, it would be great if it is already packaged as an Ant task, a
jelly script, a XSL or DVSL script, etc.... ;-)

Am I asking for too much? :-)

Thanks
-Vincent

> -----Original Message-----
> From: Martin van den Bemt [mailto:mllist@mvdb.net]
> Sent: 12 November 2002 11:13
> To: Jakarta Commons Developers List
> Subject: Re: [Q] How to merge 2 web.xml files?
> 
> use betwixt ?
> 
> Mvgr,
> Martin
> 
> On Tue, 2002-11-12 at 12:07, Vincent Massol wrote:
> > Hi,
> >
> > I would like to merge 2 web.xml files programmatically and generate
a
> > new web.xml. Do you know if there's some library or code that
already
> > does this?
> >
> > I know Tomcat has a global web.xml. Is there some code I could use
from
> > Tomcat?
> >
> > Does anyone has a DVSL/XSL/other stylesheet for making this
> > transformation?
> >
> > Thanks a lot
> > -Vincent
> >
> >
> > --
> > To unsubscribe, e-mail:   <mailto:commons-dev-
> unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:commons-dev-
> help@jakarta.apache.org>
> >
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Q] How to merge 2 web.xml files?

Posted by Martin van den Bemt <ml...@mvdb.net>.
use betwixt ? 

Mvgr,
Martin

On Tue, 2002-11-12 at 12:07, Vincent Massol wrote:
> Hi,
> 
> I would like to merge 2 web.xml files programmatically and generate a
> new web.xml. Do you know if there's some library or code that already
> does this? 
> 
> I know Tomcat has a global web.xml. Is there some code I could use from
> Tomcat?
> 
> Does anyone has a DVSL/XSL/other stylesheet for making this
> transformation?
> 
> Thanks a lot
> -Vincent
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Q] How to merge 2 web.xml files?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 12 Nov 2002, Vincent Massol wrote:

> Date: Tue, 12 Nov 2002 11:07:15 -0000
> From: Vincent Massol <vm...@octo.com>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: tomcat-dev@jakarta.apache.org,
>      'Jakarta Commons Developers List' <co...@jakarta.apache.org>
> Subject: [Q] How to merge 2 web.xml files?
>
> Hi,
>
> I would like to merge 2 web.xml files programmatically and generate a
> new web.xml. Do you know if there's some library or code that already
> does this?
>
> I know Tomcat has a global web.xml. Is there some code I could use from
> Tomcat?
>

Tomcat doesn't actually merge the two files in any XML sense -- it simply
parses (using Digester) the global web.xml followed by the local web.xml.

> Does anyone has a DVSL/XSL/other stylesheet for making this
> transformation?
>

The document() function in XSLT should be able to help you here.  For an
example, the Struts documentation is produced by XSLT transformations that
(among other things) use document() to import the project.xml file
(defining the menu bar) into each page.  See "doc/stylesheets/struts.xsl"
in the source distro.

> Thanks a lot
> -Vincent
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Q] How to merge 2 web.xml files?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 12 Nov 2002, Vincent Massol wrote:

> Date: Tue, 12 Nov 2002 11:07:15 -0000
> From: Vincent Massol <vm...@octo.com>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: tomcat-dev@jakarta.apache.org,
>      'Jakarta Commons Developers List' <co...@jakarta.apache.org>
> Subject: [Q] How to merge 2 web.xml files?
>
> Hi,
>
> I would like to merge 2 web.xml files programmatically and generate a
> new web.xml. Do you know if there's some library or code that already
> does this?
>
> I know Tomcat has a global web.xml. Is there some code I could use from
> Tomcat?
>

Tomcat doesn't actually merge the two files in any XML sense -- it simply
parses (using Digester) the global web.xml followed by the local web.xml.

> Does anyone has a DVSL/XSL/other stylesheet for making this
> transformation?
>

The document() function in XSLT should be able to help you here.  For an
example, the Struts documentation is produced by XSLT transformations that
(among other things) use document() to import the project.xml file
(defining the menu bar) into each page.  See "doc/stylesheets/struts.xsl"
in the source distro.

> Thanks a lot
> -Vincent
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>