Re: Freemarker - Disk space usage

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Tuesday, April 6, 2010, 12:32:30 PM, viswauk wrote:

> Hi,
> I am new to freemarker. Kindly bear with my question.
> I need to use freemarker without using disk space for 'merge'; mean
> templates are coming from database as a String/ BLOB. Not from diskspace (or
> in future it may come from some Content Management Server) 
> My doubt...
> 1) Still do I have store the db return string/blob data to a file (in disk)
> and use it for 'getTemplate()'?

Not at all. You can create a new implementation of
freemarker.cache.TemplateLoader that loads templates direct from the
database. You can pass an instance of it to your Configuration
instance using setTemplateLoader() during application initialization.

> 2) Can you please provide me a sample program incase of any alternate way
> available?

I saw one on someone's blog that used Entity Beans (J2EE stuff) for
database access.

> Thanks in advance.
>
> Regards,
> Viswa.

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.