This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Controling page Display Vertically
help me to make menu list float in CSS
JEE example with EJB, JSF is not working
Spring MVC Request Mapping
Target Unreachable