File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 17260
    
    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
 
 
subject: Using a list in Velocity template