Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fix urls

FreeMarker tags are extensions of the generic Struts Tags provided by the framework. You can jump right in just by knowing the generic structure in which the tags can be accessed: <@s.tag> ...</@s.tag>, where tag is any of the tags supported by the framework.

...

Unlike older versions of JSP (in which the JSP Tags are based), FreeMarker allows for dynamic attributes, much like JSP 2.0. You can supply attributes to the tags that the tag doesn't explicitedly support. Those attributes that cannot be applied directly to the tag object will be set to the tag's general-purpose parameters Map.

...

Remember that all tag attributes must first be set as Strings - they are then later evaluated (using OGNL) to a different type, such as List, int, or boolean. This generally works just fine, but it can be limiting when using FreeMarker which provides more advanced ways to apply attributes. Suppose the following example:

...

What will happen here is that each attribute will be evaluated to a String as best it can. This may involve calling the toString method on the internal FreeMarker objects. In this case, all objects will end up being exactly what you would expect. Then, when the tag runs, the list attribute will be converted from a String to a List using OGNL's advanced collection support.

...