Dave,

Thanks for the quick response.

Maybe I haven't described my situation clearly enough.

Here is what I'm looking for:



I have a presentation handler class which reads the template(s) from file(s)
in the file system, and stores these templates in a Hashtable of Strings.

Velocity.getTemplate() method seems to accept the filename parameter, which
is passed from the script as an argument, and which is also the name of the
template file on the file system.

Since I already have the templates pre-cached, I would like to pass a String
containing the text of the template to Velocity.getTemplate() instead of
passing the name of the template file.  

Is this possible with the existing API?

Thank you

Simeon



-----Original Message-----
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 4:44 PM
To: Velocity Users List
Subject: Re: resource loading question


> Is there an API method to get Template from a StringBuffer in memory
instead

> of from the file, or should I create my own?

> something like: Velocity.getTemplate(templateStringBuffer)



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



is a link into the developer's guide which has a code example to do what

I think you're asking (the template is a string, not a file).



Dave







---------------------------------------------------------------------

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]

Reply via email to