I am unable to understand the code given below.Can anyone suggest me how to write the code for .ftl files .I am following the turtorial http://www.mkyong.com/struts2/working-with-struts-2-theme-template/
<#--
Only show message if errors are available.
This will be done if ActionSupport is used.
-->
<#assign hasFieldErrors = parameters.name?? && fieldErrors??
&& fieldErrors[parameters.name]??/>
<#if hasFieldErrors>
<#list fieldErrors[parameters.name] as error>
<span class="errorMessage" errorFor="${parameters.id}">${error?html}</span><#t/>
</#list>
</#if>
Struts2 templates are written in Freemarker. You need to have a little Freemarker knowledge to understand the code. Here’s the manual to get you started.