velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <d...@solaraccess.com>
Subject Re: Template from String
Date Thu, 15 May 2003 13:16:51 GMT
> I have a database of email messages that are to be used as templates with 
> Velocity. The examples assume templates will be files (template.vm). I will 
> be getting the templates as java.lang.String objects. Could someone tell me 
> how to load a template from a String rather than a file?

http://jakarta.apache.org/velocity/developer-guide.html#Using%20Velocity%20In%20General%20Applications

Velocity.evaluate(velocontext, writer, logstr, stringTemplate)

works for me.

If there's a reason that all the other solutions didn't use this and
talked about loaders and all that I'd _really_ like to know, because
I've been using this method for awhile and it works fine for me.

Thanks,
Dave



---------------------------------------------------------------------
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