velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Chalmers" <colin.chalm...@maxware.nl>
Subject RE: Templates in DB instead of on Disk
Date Fri, 27 Sep 2002 09:46:43 GMT
Hi Bill,

Thx for the reply, however I may have worded my question wrong. Instead of
extending Velocity to work with different resources is it not an idea to be
able to init Template object with a String which represents a template.

ie, I can query the DB for a specific template after which I can pass it as
a String to the Template Object afterwhich I can Merge the data.

Or would this cause other problems?

/colin

-----Original Message-----
From: Bill Kaufman [mailto:BKaufman@zaplet.com]
Sent: Thursday, September 26, 2002 9:29 PM
To: Velocity Users List
Subject: RE: Templates in DB instead of on Disk


You'll need to write your own implementation of
org.apache.velocity.runtime.resource.loader.ResourceLoader, and list it in
your Velocity properties file's "resource.loader" property.

See the javadoc for information on ResourceLoader, and


http://jakarta.apache.org/velocity/developer-guide.html#Configuring%20Resour
ce%20Loaders

for information on the properties file.

                                                      -- Bill K.


> -----Original Message-----
> From: Colin Chalmers [mailto:colin.chalmers@maxware.nl]
> Sent: Thursday, September 26, 2002 12:03 PM
> To: velocity-user@jakarta.apache.org
> Subject: Templates in DB instead of on Disk
>
>
> Hi,
>
> Is it possible to store templates in another location than
> Disk; ie Ldap
> and/or a DB? I looked at the Javadocs for the Template object
> but that seems
> to go through
>
> Template = Velocity.getTemplate("NameOfTemplate")
>
> I'm using Velocity in EJBeans reading from Disk, which works
> fine for now.
> However I'm thinking about moving the 3 or 4 templates I use
> for generating
> messages to another source.
>
> Thx
>
> /colin
>
>
> --
> To unsubscribe, e-mail:
> <mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:velocity-user-help@jakarta.apache.org>
>
>

--
To unsubscribe, e-mail:
<mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:velocity-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message