tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From QM <qm...@brandxdev.net>
Subject Re: web.xml pointing to other xml files?
Date Tue, 29 Jun 2004 02:07:53 GMT
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message