Or, if you are not concerned about caching of the template, you could use on
of the Velocity.evaluate methods.

Cort

-----Original Message-----
From: Daniel Rall [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 3:42 PM
To: Long Zhao
Cc: Velocity Developers List

"Long Zhao" <[EMAIL PROTECTED]> writes:

> Hi all,
>
> I know I can get a template from a file name by calling
Velocity.getTemplate(templateFileName).
>
> But can I get a template from byte[] or steam? since I have the template
stored in database as a blob.

Sure you can.  You'll want to implement your own ResourceLoader by
sub-classing this class:

velocity/src/java/org/apache/velocity/runtime/resource/loader/ResourceLoader
.java
--

Daniel Rall

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