Re: Freemarker loading into JSP
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Monday, June 2, 2008, 12:28:38 PM, Attila Szegedi wrote: > You could try using freemarker.ext.jsp.FreemarkerTag God! :) I felt something is wrong when I said that I don't know about such stuff... > - 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. Just to prevent people misunderstand this, you are talking about that the "source code" of the template is fixed (and thus its parsed form is cached), not that the *output* of the template is fixed. > 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 > > > > > -- 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/