Use velocity's form of poor man's escaping, which will always work:
#set ($D = '$' )
${D}{javadoc.${set}.title}
will then properly output: ${javadoc.foo.title} as you desired.
If you have the EscapeTool in the context (from VelocityTools)
$esc.d{javadoc.${set}.title}
Cheers,
Christoph
P.S. you will find tip like these if you search (here "escape")
in the velocity-user mailing list archives.
Yves Martin wrote:
Hello,
I'm trying to generate a Ant build.xml with Velocity and I'm currently
fighting to output the Ant property access ${myproperty}
In fact, it is more complex because the property name uses dots.
To be concerte, I have a $set reference (equals to "foo" for instance), and I
want to generate
${javadoc.foo.title}
from $set in place of foo.
What should I do to get such a result ?
Thank you in advance for your help
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]