tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [Q] How to merge 2 web.xml files?
Date Tue, 12 Nov 2002 17:23:48 GMT


On Tue, 12 Nov 2002, Vincent Massol wrote:

> Date: Tue, 12 Nov 2002 11:07:15 -0000
> From: Vincent Massol <vmassol@octo.com>
> Reply-To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
> To: tomcat-dev@jakarta.apache.org,
>      'Jakarta Commons Developers List' <commons-dev@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:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message