Re: Freemarker loading into JSP

Attila Szegedi <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
You could try using freemarker.ext.jsp.FreemarkerTag - it's a JSP tag  
that evaluates a FreeMarker template embedded into it. Note it'll  
cache the parsed template after first evaluation of the tag (it  
assumes the template text is fixed). If your template text can vary,  
you'll need to set caching="false" in the tag, but that'll severely  
impact the performance, as the template text will be reparsed on each  
evaluation.

Attila.

On 2008.06.02., at 12:12, Daniel Dekany wrote:

> Thursday, May 29, 2008, 3:13:35 PM, kukudas wrote:
>
>> Hello,
>>
>> is it possible to have for example in a jsp a reference to an  
>> freemarker
>> template which contains in a jar file? So i could make seperate  
>> modules and
>> load the freemarker templates into a jsp file? If not is there any  
>> similar
>> way to do this? Are there maybe some examples which can provide  
>> some useful
>> information? I'm really intrested in such features but i'm at my  
>> first step
>> with this so excuse me for maybe asking dumb question. I hope  
>> someone can
>> help me.
>
> You want to embed FreeMarker templates into JSP pages if I understand
> well. I don't whether someone has already did it and published it, but
> anyway it's surely possible. You have to write a custom JSP tag for
> it. In the implementation of that that you can simply use the
> FreeMarker API to load/process/cache FreeMarker templates and to setup
> the data-model.
>
>> regards kuku
>
> -- 
> Best regards,
> Daniel Dekany






-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
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.