Alex Jeannopoulos wrote:
>
> I am curious, I have been looking at Velocity and I was wondering if it had
> a tool like capability that allows a variable (Tool) to be used from a
> template without explicitly being placed into the context? Thanks
No - we didn't add that capability.
Since Velocity must be invoked from a servlet, we figured that it was
something to be done at application level. To assist in this, we added
something we call chained or wrapped contexts, so you can have a base
class that sets up tools for you, and your derived class can add what's
needed :
VelocityContext vc1 = new VelocityContext();
...
VelocityContext vc2 = new VelocityContext(vc1);
and anything in vc1 is accessable from vc2 as long as you don't
explicitly do a put() into vc2.
See the docs.
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
System and Software Consulting
Developing for the web? See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!