Hi,
I'm trying to use Velocity with Struts 2. At this moment, I have two
view files: one with taglibs and one with Velocity tags. The first dumps
texts with <s:text name="foo"> (where foo var is stores in a
package.properties file), and works fine. The Velocity template looks
like:
<tr align="right">
#stext (name="Results.counter1")<br>
$text.get('Results.counter1', [$result.getTotalRowsNumber()])<br>
$text.exists("Results.counter1")
</tr>
<tr>
<table id="results">
#foreach($offer in $offers)
<tr>
<td>
<a
href="$link.setAction('/Redirect.action').param('url',
$offer.url)">$offer.title</a>
</td>
</tr>
#end
</table>
</tr>
The $link, #foreach, etc work fine, but the text tags works wrong. This
is the output for this code:
#stext (name="Results.counter1")
$text.get('Results.counter1', [$result.getTotalRowsNumber()])
false
What am I doing wrong? Taglibs and Velocity works with the same
package.properties. I have tried to put this resource file replicated in
a lot of directories, allways in the classpath, but the result is
allways the same...
Please, help! :P
Thanks a lot for your time!
Cheers!