tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "GOMEZ Henri" <>
Subject RE: Tomcat 3.3 and 4.x tuning via command line
Date Fri, 08 Feb 2002 22:51:48 GMT
>There's a lot of power in what the <replace> task can do.  
>Here's a very
>simple one that replaces the string "@port@" with the port number
>specified by the "port" property:
>  <project name="Create server.xml" default="generate">
>    <target name="generate" description="Generate customized 
>      <replace file="server.xml" token="@port@" value="${port}"
>    </target>
>  </project>
>In your template server.xml, you'd have a <Connector> element 
>like this:
>  <Connector ... port="@port@" .../>
>Now, you just run "ant -Dport=8085" and you've replaced the 
>port number.
>Generalizing this to replace lots of properties is straightforward.

Thanks Craig it's a very good example of Ant Power, I will certainly
reuse it for others purposes.

But it won't fit my current need since in my project I have to launch 
not less than 20 differents Tomcat instance on the same machine !

TC 3.3 property overriding is more easy to use in such situation and
should be a very usefull feature for TC 4.x.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message