Re: Freemarker loading into JSP
kukudas <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, ive now looked into some examples i gotta say the possiblity to define your own macros and load them into a file you need is pretty nice. I didn't used the TemplateLoader feature yet, ive looked also into some examples but im not sure for what i could need that. And i don't know but it kinda always looked "ugly" when i saw any example with it. So do you think it is better to have let say some macros and some main files. And you load these macros when needed into the main files. With main files i mean the files which actualy getting viewed to somebody. This seems nice, when you have to change something you do it in the macro or u define a new one and add it. So which advantage could bring me a TemplateLoader or maybe im asking wrong which things could i do better. As site note i'm using struts and spring i think i already said that. But i saw some codes about integration of freemarker beans into spring. But i didnt found any runable example or best practises. So far i know yet i will probably use struts 2 in the strut.xml to populate the view. And keep using macros to build it modular. Sorry if i'm asking some dumb questions, i'd just wanna do it the right way because i know that it can be a pain in the ass changing everything after i'm done with my work. I did that several times so now i wanna be sure :). Daniel Dekany wrote: > > Monday, June 2, 2008, 4:19:35 PM, kukudas wrote: > > [snip] >> Hello Daniel, >> >> thanks for your reply. Is there any example to build a custom >> TemplateLoader? > > You don't need those examples... look at the JavaDocs of the > TemplateLoader interface, it's simple. (But if you still need > examples, the FreeMarker source code itself contains several > implementations of TemplateLoader.) > >> I thought about that too to just stick to Freemarker, problem is that i >> have >> now only jsp's >> so that would maybe to much effort to change them all, thats why i wanna >> try >> it first embedded. >> You right basicly i just need to define a macro and i could just >> reference >> to it, i didnt thought about yet >> but it seems promesing. > > -- > 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/ > _______________________________________________ > FreeMarker-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freemarker-user > > -- View this message in context: http://www.nabble.com/Freemarker-loading-into-JSP-tp17535519p17729585.html Sent from the freemarker-user mailing list archive at Nabble.com. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php