velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr. <ge...@adeptra.com>
Subject Re: hash map or equivalent possible
Date Fri, 20 Dec 2002 03:27:12 GMT

On Thursday, December 19, 2002, at 01:55 PM, Andy Lee wrote:

> At 8:28 AM +0000 12/19/02, Charlene Mitchell wrote:
>> Hi,
>>
>> Where would I get $map from in the first place?
>>
>> I cannot add it to the context as I only have access
>> to Velocity templates and not to the Java code.
>>
>
> Someone once posted a hack that was something like this:
>
>
> #set( $foo = "ignored" )
> #set( $map = 
> $foo.getClass().forName("java.util.HashMap").newInstance() )

Definitely doable, but it's something we might take away in the future 
(or make it so it can be turned off...), as you can guess at the 
security implications...


-- 
Geir Magnusson Jr                                   203-355-2219(w)
Adeptra, Inc.                                       203-247-1713(m)
geirm@adeptra.com


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message