Hi,
 
The class has to be a public class. It was in the same package as the
rest of the code, so dont know exactly why this is an issue. But there
you go...
 
thanks
Jenny Mathew
 
 

________________________________

From: Jenny Mathew (jenmathe) 
Sent: Friday, October 14, 2005 4:06 PM
To: 'velocity-user@jakarta.apache.org'
Subject: unable to invoke a function from an object passed into the
velocity context


Hi all,
 
Saw some related questions on this topic, but it did not solve the
problem.
 
I have created an object containing an HashMap internally and have
passed that to the velocity template. The object has public non static
method say a() which returns a String. However, on invoking the function
in the template thus-
 
$obj.a(), nothing is returned. However, $obj.getClass().getName()
returns the expected answer.
Any ideas why nothing is returned?
 
thanks
Jenny Mathew
 
 

Reply via email to