if you just want to evaluate strings, use the "evaluate()" method of Velocity or VelocityEngine. If you actually want Template objects, that's a little trickier. However, I do remember seeing a StringResourceLoader being contributed sometime back for this purpose, but i'm not sure it ever made it into cvs or the wiki. you should try searching the velocity-dev list archives for "StringResourceLoader".
On Fri, 28 Jan 2005 11:39:23 -0800 (PST), sunil goyal <[EMAIL PROTECTED]> wrote: > Hello all, > > I am using Velocity within some > servlets(VelocityServlet). I want to get a template > from a String rather than a file. I am not able to > find the appropriate function for that. > > For getting a template from file, there is a method > called > Template getTemplate(String path) in VelocityServlet. > > I am storing small template files as String in a > database, and want to construct template from that > string. > > Template getTemplateFromString(String data) or an > InputStream ? > > Thanks > > Regards > Sunil > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
