velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: Pass templates directly to Velocity
Date Thu, 08 Mar 2001 02:17:15 GMT
> Morten Hoyer wrote:
> 
> I ran into a situation in which I need to pass dynamically generated
> templates directly to Velocity.  However, it seems like this is not
> supported in the current version.  Rather, Velocity is always
> expecting a name of a template, and relies on one of the loaders to
> locate and load the contents.
> 
> Any insight into this is greatly appreciated.

Take a look at the class org.apache.velocity.app.Velocity.

It has a method  evaluate() that will process either an InputStream or a
String.

That should do what you need. (I use it for this exact purpose...)

geir

-- 
Geir Magnusson Jr.                               geirm@optonline.com
Developing for the web?  See http://jakarta.apache.org/velocity/

Mime
View raw message