Call class methods Posted on: August 26, 2008 By Deepak Kumar
This Example shows you how to call class method in velocity template.
Call class methods
This Example shows you
to call class method in velocity template. Steps used in the code given below :
1: Initialize velocity through method init().
2: Create object of VelocityContext Class.
3: Use put() method of Class VelocityContext through object 'ctx'.
4: Create the object of java.util.Date class
5: Set into velocity context
6: Then use this (Date) object in velocity template.