You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Allistair Crossley <Al...@QAS.com> on 2005/10/20 11:22:44 UTC
Using placeholders in context.xml for builds
Hi,
Anyone know if you can use placeholders in context files, e.g
<Context docBase="ROOT" reloadable="${tomcat.webapp.root.reloadable}" antiJARLocking="tomcat.webapp.root.antijarlocking" antiResourceLocking="tomcat.webapp.root.antireslocking">
Currently I am using Ant to perform replacements on the single quoted values in full, e.g replace reloadable='true' with reloadable='false'
<Context docBase="ROOT" reloadable='true' antiJARLocking='false' antiResourceLocking='false'>
It works but it's not quite elegant,
Cheers, Allistair
<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
-------------------------------------------------------
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLACK>
Disclaimer: The information contained within this e-mail is confidential and may be privileged. This email is intended solely for the named recipient only; if you are not authorised you must not disclose, copy, distribute, or retain this message or any part of it. If you have received this message in error please contact the sender at once so that we may take the appropriate action and avoid troubling you further. Any views expressed in this message are those of the individual sender. QAS Limited has the right lawfully to record, monitor and inspect messages between its employees and any third party. Your messages shall be subject to such lawful supervision as QAS Limited deems to be necessary in order to protect its information, its interests and its reputation.
Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS Limited cannot guarantee that attachments are virus free or compatible with your systems and does not accept any liability in respect of viruses or computer problems experienced.
</FONT>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Using placeholders in context.xml for builds
Posted by Bob Hall <rf...@yahoo.com>.
Allistair,
You can use ant's <copy/> task with 'filtering'
enabled to accomplish what you want to do.
This can be done uing properties files or with
command line parameters.
foo.properties:
reloadable=true
command line:
$ ant -Dreloadable=true
<copy filtering="true" .....>
<filterset>
<filtersfile
file="${props.src.dir}/foo.properties" />
<filter token="reloadable"
value="${reloadable}"/>
</filterset>
</copy>
- Bob
<Context docBase="ROOT" reloadable="@reloadable@"
antiJARLocking="tomcat.webapp.root.antijarlocking"
antiResourceLocking="tomcat.webapp.root.antireslocking">
--- Allistair Crossley <Al...@QAS.com>
wrote:
> Hi,
>
> Anyone know if you can use placeholders in context
> files, e.g
>
> <Context docBase="ROOT"
> reloadable="${tomcat.webapp.root.reloadable}"
> antiJARLocking="tomcat.webapp.root.antijarlocking"
>
antiResourceLocking="tomcat.webapp.root.antireslocking">
>
> Currently I am using Ant to perform replacements on
> the single quoted values in full, e.g replace
> reloadable='true' with reloadable='false'
>
> <Context docBase="ROOT" reloadable='true'
> antiJARLocking='false' antiResourceLocking='false'>
>
> It works but it's not quite elegant,
>
> Cheers, Allistair
>
>
> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
>
-------------------------------------------------------
> QAS Ltd.
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
>
-------------------------------------------------------
> </FONT> <FONT SIZE=1 FACE="VERDANA,ARIAL"
> COLOR=BLACK>
> Disclaimer: The information contained within this
> e-mail is confidential and may be privileged. This
> email is intended solely for the named recipient
> only; if you are not authorised you must not
> disclose, copy, distribute, or retain this message
> or any part of it. If you have received this message
> in error please contact the sender at once so that
> we may take the appropriate action and avoid
> troubling you further. Any views expressed in this
> message are those of the individual sender. QAS
> Limited has the right lawfully to record, monitor
> and inspect messages between its employees and any
> third party. Your messages shall be subject to such
> lawful supervision as QAS Limited deems to be
> necessary in order to protect its information, its
> interests and its reputation.
>
> Whilst all efforts are made to safeguard Inbound and
> Outbound emails, QAS Limited cannot guarantee that
> attachments are virus free or compatible with your
> systems and does not accept any liability in respect
> of viruses or computer problems experienced.
> </FONT>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
>
>
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org