| Newsgroups |
gmane.comp.web.freemarker.user |
| Message-ID |
<OFB8C96075.0AB1F76B-ON87257767.004AD023-87257767.004CA2E9@blm.gov> |
Correct - this is a Struts 2 thing and not a FreeMarker thing. There are
basically two parts to this - the FreeMarker UI templates used in your
theme, and the stuff you use for your actual presentation pages (which can
be JSPs, FM, Velocity etc.). Normally if you need to make changes to the UI
part you create new .ftl files that override the ones provided in the
Struts 2 package themes, rather than modifying those base ones. As far as
using the tags in your pages, they're basically the same other than the
specific syntax.
So for example if I want to use the "head" tag, in a JSP I'd use "<s:head
..." whereas if I was using FreeMarker I'd use "<@s.head ...". Both use the
head.ftl file from the theme (or my own version, if I've created one that
overrides the one provided with Struts2) to generate the output.
(Incidentally I detest JSPs for a large number of technical reasons - I use
FM exclusively for web applications).
I normally avoid making book recommendations (makes it sound like I work
for the publisher) but I'll make an exception in this case - "Struts 2 in
Action" by Brown, Davis & Stanlick is the best reference I've seen.
--Pete
Daniel Dekany <[email protected]> wrote on 07/20/2010 05:04:15 PM:
> This should be documented in the documentation of Struts 2. *If* it
> isn't documented there... well, that's the problem of the Struts
> project really. But, it's possible that those FTL tags are pretty much
> the same as the JSP tags, and so they expect you to read the
> documentation of the JSP tags. (Of course, FTL tags has a bit
> different syntax; no ${...} etc. But that part should be understood
> from the FreeMarker Manual; especially, see:
> http://freemarker.org/docs/app_faq.html#faq_question_11)
>
>
> Tuesday, July 20, 2010, 2:30:38 PM, jyothisree wrote:
>
> >
> > Hi
> >
> > I am new struts2 as well as to freemarker Template language ,Struts2
uses
> > .ftl to render the tags to the page ..
> >
> > I am finding it difficult to understand the .ftl files for each tag of
> > struts2 . but i desperately need to change the .ftl files to have my
> > requirment
> >
> > can i get any document /links so that i can understand .those files
easily
> > ..
> >
> > I have searched and found the document from freemarker.sourceforge.net
but
> > that is not useful to understand the struts2 tags ftl files
> >
> > can any one help me out with this .....
> >
> >
>
> --
> Best regards,
> Daniel Dekany
>
>
>
------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first