Results 1 to 7 of 7
Thread: ${xyz}
- 04-24-2011, 06:42 AM #1
Member
- Join Date
- Dec 2010
- Posts
- 4
- Rep Power
- 0
${xyz}
Can any one help me understanding about ${ some txt here} What does this mean. Why do we use it. I have seen this at many places in the code
Regards,
Shamim
shamim.797@gmail.com
- 04-24-2011, 06:55 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Would you mind showing an example of it in code?
- 04-24-2011, 07:00 AM #3
Member
- Join Date
- Dec 2010
- Posts
- 4
- Rep Power
- 0
Ok
here is the code
<property file="build.properties"/>
<property file="../build.properties"/>
<property file="../../build.properties"/>
<property file="${user.home}/build.properties"/>
<property name="build.compiler" value="modern"/>
<property name="webapps.build" value="../build"/>
<property name="webapps.dist" value="../dist"/>
<property name="webapp.name" value="ROOT"/>
<!-- =================== BUILD: Create Directories ====================== -->
<target name="build-prepare">
<mkdir dir="${webapps.build}"/>
<mkdir dir="${webapps.build}/${webapp.name}"/>
</target>
This code you can find in the xml file. have you installed apche tomcat . this is the build file in the apche tomcat -> webapps ->root-> build.xml file.
Also I have such at different other places.
- 04-24-2011, 07:08 AM #4
That is the equivalent of Java variables in XML. See those "<property name=..." lines? Those are "variable declarations" and using ${...} is referencing those variables. Useful when you need globals so if you need to change them, you just change the original declaration instead of each one.
- 04-24-2011, 07:23 AM #5
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,561
- Rep Power
- 11
If that's an ANT script the syntax is described in the manual.
- 04-24-2011, 07:26 AM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,604
- Blog Entries
- 7
- Rep Power
- 17
When people rob a bank they get a penalty; when banks rob people they get a bonus.
- 04-24-2011, 07:29 AM #7
Member
- Join Date
- Dec 2010
- Posts
- 4
- Rep Power
- 0


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks