Thanks. That's exactly what I need. Sorry, I didn't mention that I was working under velocity 1.5. I'll upgrade to 1.6.1.
On Mon, Jan 5, 2009 at 2:35 PM, Nathan Bubna <[email protected]> wrote: > Velocity 1.6.1 comes with a StringResourceLoader. just specify that > as your resource loader, > then call StringResourceLoader.getRepository().putStringResource(String > name, String template) to add your templates. Read the javadoc for > that class for more information. > > > On Mon, Jan 5, 2009 at 2:16 PM, Caleb Jones <[email protected]> wrote: > > This didn't seem to make it when I sent it before subscribing, so I'm > trying > > again (sorry for any duplication): > > > > I, for better or worse, need to load my velocity templates as Strings. > > Thus, in order to parse them, I am using VelocityEngine's > > evaluate(VelocityContext, Writer, String, String) method. As far as I > can > > tell, this evaluate() method does not do AST caching, no? > > I have three questions: > > 1. Does the evaluate() method do AST caching? > > 2. If not, is there a way to load a velocity template as a string and > have > > the velocity engine do AST caching? > > 3. If not, how do I request this feature? It seems like doing AST > caching > > for template strings passed into evaluate() would be fairly straight > > forward. Perhaps have this as a config option (ie: > > string.resource.loader.cache=true). > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
