If you're a new user of Struts2 and JSP then I suggest you simply start with JSP as there's far more resources and tutorials available. You only must become aware of Freemarker once you wish to extend the default themes.

Within Struts2, by default Freemarker templates are used when rendering the UI components (ie. the S2 taglib classes that extend AbstractUITag such as TextField). eg. if you use the <s:textfield> tag, Struts2 will render it using the text.ftl template for the specified/current theme.

Eventually you may wish to extend the theme (change with the way <s:textfield> is rendered) at which time you'll probably create your own templates for the UI components-of-interested and start using Freemarker.

Eventually may you also wish to create your own taglib UI components following the the S2 conventions in which case you'd follow the same template approach (but Struts2 does not preclude you from using any other JSP/taglib convention).

As mentioned in previous responses and the link below, Struts2 allows you to use entire Freemarker page results instead of JSP. There are good technical arguments for using Freemarker instead of JSP, but generally speaking right now you'll find more people to help, initially less effort, more jobs and better IDE-support with JSP and almost everything you learn with JSP can be later be applied within the Freemarker context.



On 5/17/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:

FreeMarker is a template engine, with it's own syntax. JSP tags can be
used
in FreeMarker, adding some configuration. In the case of Struts tags, no
configuration is required, and you can use them like you would in JSP
except
a few differences, see this for details:

http://struts.apache.org/2.x/docs/freemarker.html

musachy

On 5/17/07, Jordi Rubio Moreno <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm a bit confused. I need to decide if I'll use Freemarker or Struts
> taglibs, and I don't know the differences between both. E.g. what's the > difference between <s:iterator> and <@s.iterator>, <s:url> and <@s.url>,
> etc etc...
>
> I have seen all the tutorials and examples I have found working with
> taglibs, but people says WebWork and Struts 2's choice is Freemarker...
>
> Please, help me to understand why taglibs or Freemarker :)
>
> Thanks a lot!
>
> Cheers!
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd


------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.4/811 - Release Date: 18/05/2007 3:50 PM


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to