Meaningless Drivel is fun!*
The moose likes Spring and the fly likes Using a list in Velocity template Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Using a list in Velocity template" Watch "Using a list in Velocity template" New topic

Using a list in Velocity template

sadanand munswamy
Ranch Hand

Joined: Apr 10, 2012
Posts: 39
Hi All,
I need to render data using a list in my velocity template, Some how i am not getting the script correct.
Here is my LVTE.vm

The supporting main class is

The list is dummy list and not null.

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17249

Not sure, maybe it is the template and not your code.

This is the code I have that works

Map model = new HashMap();
model.put("support", support);
String text = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "com/dns/registration-confirmation.vm", model);
message.setText(text, true);


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
subject: Using a list in Velocity template
Similar Threads
help me to make menu list float in CSS
JEE example with EJB, JSF is not working
Spring MVC Request Mapping
Controling page Display Vertically
Target Unreachable