On Wed, Jul 9, 2008 at 9:59 AM, Paul M <[EMAIL PROTECTED]> wrote:
> How do I get all keys that were set by java app.?
> i.e.
>
> Java:
> context.put("name", "Velocity");
> context.put("project", "Jakarta");

context.put("context", context);

> Velocity:
> $name
> $project
> $versionDoesNotExist
>
> #foreach($key in $application.attributeNames) works good, but not what I need!

are you using VelocityTools?   if so, add the ContextTool in request
scope.  it will get you all possible context values:
http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/tools/view/tools/ContextTool.html

> #foreach($key in $context.keys) does nothing; because $context is null?

if you put the context in the context, then it will not be null. :)

> so
> #foreach(??? in ???)
> return
> "name","project"...etc
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to