velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
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?

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message