velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@4quarters.com>
Subject Re: questions?
Date Fri, 13 Feb 2004 12:13:18 GMT

On Feb 12, 2004, at 4:36 PM, Lu, Tao wrote:

> Hi, experts,
>
> How to get a Template from a InputStream?


Right now, you can't actually get one, although you can render it.  
When you think about it, that's probably an oversight that we can fix, 
I suppose.

To use the InputStream :

VelocityEngine ve = new VelocityEngine();
ve.init();

ve.evaluate(context, writer, "foo", inputStream);

where context is your VelocityContext, writer is a Writer for output to 
be rendered to, "foo" is a tag for logging purposes - it can be 
anything or "" , and inputStream is of course...

geir

>
> Thanks
> Tao
>
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geir@4quarters.com


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


Mime
View raw message