I'm using Apache Velocity and need to append a string to a variable that I'm accessing using velocity.
Here's my current code with the desired functionality.
<div id="$settings.name" + "Setting"></div>
$settings.name
is a variable being parsed by Velocity and "Setting"
is the literal I want to append to it.
Can anyone provide me some information on how to achieve this?
A cursory google search has revealed the answer:
http://velocity.apache.org/engine/1.7/user-guide.html#string-concatenation
It looks like you'll need to write it like this:
id="${settings.name}Setting"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.