Apache speed: hashtable?

Velocity User Guide mentions "Hashtable". However, no mention is made of how to create it in this language.

So, if you can show how to do this - so that I can write smth. as

#foreach( $key in $foo.keySet() )
    <li>Key: $key -> Value: $foo.get($key)</li>
#end

“I am very grateful for your help.”

Thanks in advance!

// PS: my original problem: Mechanical tools Turk / Cmd / Qualification / # set and #foreach in xml So please understand that I am not interested in learning speed - I need only one quick hack if possible. Thank.

+5
source share
1 answer

Velocity #set . , - :

#set($foo = {
    "NEWS": "http://news.bbc.com",
    "SEARCH": "http://google.com"
})

foreach , .

+9

All Articles