This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Using a list in Velocity template" Watch "Using a list in Velocity template" New topic
Author

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.

HELP !!
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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);

Mark


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