I'm trying to figure out a way to access the Struts 2 action messages in a
Freemarker template.  I copied the following code from the Struts template
directory, into my Freemarker view, but the action errors do not show up,
which tells me I must not be using the correct variable.

[#if (actionErrors?exists && actionErrors?size > 0)]
   <ul>
   [#list actionErrors as error]
       <li><span class="errorMessage">${error}</span></li>
   [/#list]
   </ul>
[/#if]


I've also tried Request.actionErrors, but this doesn't work either.

Does anyone have an idea how I can get access to these?  I need to be able
to customize the output of these messages.  I know there is a way to
override the Struts 2 default template, but I need to combine actionErrors
and actionMessages in a single template.

Thanks for any help.

Reply via email to