I used the following package to overcome this issue. I know there are other possibilities such as using tokens in Ant but this worked quite well for what we wanted to do: http://www.oopsconsultancy.com/software/xmltask.html


or try this

<target name="merge-descriptors">
<loadfile property="webinc.xml" srcFile="${dest.dir}/webinc.xml"/>
<copy file="${war.expanded.dir}/WEB-INF/web.xml" toFile="${war.expanded.dir}/web.xml">
<filterchain>
<replacetokens>
<token key="WEBINC" value="${webinc.xml}"/>
</replacetokens>
</filterchain>
</copy>
</target>


in your web.xml, you must have a token @WEBINC@ that you will relpace with the contents of weninc.xml.



hope his helps,

-robert








From: Felipe Schnack <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: repost: jspc webinc.xml
Date: 18 Feb 2003 11:11:28 -0300

I'll try that.
But how could I merge files using ant? I'm actually using it.

On Tue, 2003-02-18 at 10:43, Kris Schneider wrote:
> You can try treating the generated fragment as an external entity. Assuming the
> fragment is in a file called webinc.xml (colocated with web.xml), try the
> following in your web.xml:
>
> <?xml version="1.0"?>
>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";
> [<!ENTITY webinc SYSTEM "webinc.xml">]
> >
>
> <web-app>
>
> &webinc;
>
> <web-app>
>
> I've had problems with this on some app servers (I think TC was okay though).
> You could also perform some sort of merge during your build process (probably
> Ant based).
>
> Quoting Felipe Schnack <[EMAIL PROTECTED]>:
>
> > I'm unable to undertstand a JSPC concept...
> > If I generate my JSP's java sources and binaries, I can include the
> > -webinc parameter to make jsp generate a file with servlet declarations
> > for all my web pages...
> > That's ok, but how I include this to my web.xml?
> > --
> >
> > Felipe Schnack
> > Analista de Sistemas
> > [EMAIL PROTECTED]
> > Cel.: (51)91287530
> > Linux Counter #281893
> >
> > Centro Universitário Ritter dos Reis
> > http://www.ritterdosreis.br
> > [EMAIL PROTECTED]
> > Fone/Fax.: (51)32303341
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech <http://www.dotech.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341


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

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail


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

Reply via email to