On Mon, Jun 28, 2004 at 09:45:55AM -0700, Woodchuck wrote:
: actually i'm using Ant too.  i'm pre-compiling using the <jspc> task
: and it generates a file containing <servlet> and <servlet-mapping>
: tags.  that's exactly what i need to do really, is to merge this file
: with my web.xml file.  if you can show me how you're doing it that
: would be great, thanks!

Appended below.  Perl's "TMTOWTDI" motto reigns here, because I'm
certain there are other (and gmore elegant) ways to do this...

-QM


... from build.xml ...
        <!--
        make the contents of the precompiled JSP mappings
        (from the "jspc" task) available as a replacement
        variable "@PRECOMPILED_JSPS@" in web.xml
        -->

        <loadfile
                property="jsp.precomp.data"
                srcFile="${warfile.build_dir}/WEB-INF/precompiled_jsps.xml"
        />

        <!--
        copy the web.xml to its destination, and in the process,
        replace "@PRECOMPILED_JSPS@" with the content of the
        precompiled_jsps.xml file
        -->

        <copy
                file="files.WEB-INF/web.xml"
                overwrite="true"
                toFile="${warfile.build_dir}/WEB-INF/web.xml"
        >
                <filterset>
                        <filter
                                token="PRECOMPILED_JSPS"
                                value="${jsp.precomp.data}"
                        />
                </filterset>

        </copy>

... from web.xml (before it's copied with Ant's <copy> task ...

        <!-- BEGIN: precompiled JSPs -->
        @PRECOMPILED_JSPS@
        <!-- END: precompiled JSPs -->


-- 

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


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

Reply via email to