Top "Velocity" questions

How to #include a file from a Velocity template using ClasspathResourceLoader

I'm dealing with some Java code where Velocity 1.7 is set to retrieve templates through the ClasspathResourceLoader. Below is a stripped …

java templates velocity
Velocity templates seem to fail with UTF-8

I have been trying to use a velocity Template with the following content: Sübjäct $item Everything works fine …

java utf-8 velocity
Getting velocity error at statup "VM_global_library.vm"

I am using Velocity with Spring. But in Eclipse console I get this error. My code works fine, but I …

java spring velocity
Calling class methods (static) from inside a velocity view page

Can you call class methods from inside a view page? Specifically ones that are not passed into the view? In …

java velocity
Velocity Template engine - key-value-map

I have some problems wo use a key-value-map into Velocity. Someone has an example of this functionality? $myMap ={} $myMap.put("…

apache templates transformation velocity
Calling Macro function in Velocity template

I am trying to figure out how to return a value from a velocity macro call and assign it to …

java apache velocity
Why should I learn and use struts?

I'm a java developer, not seasoned, but I am familiar with most concepts reasonably well. I recently built a website …

java jsp struts2 velocity
Escaping quotes in velocity template

I have a java method, that takes a few strings. This method needs to be called from a Velocity Template. …

java velocity quotes
Velocity (VM) template request parameters: Getting GET variables

How do i access GET variables as passed in the URI in a VM template? This works only when loading …

liferay velocity vtl liferay-velocity
How to get a zero-based count in a Velocity foreach loop

I am trying to get a zero-based counter in a Velocity #foreach directive. if i use: #foreach ($item in $list) …

java foreach velocity