wt., 4 sty 2022 o 16:10 Britta Katzenbach <katzenb...@liwa.de> napisał(a):
> When switching from struts 2.5.26 to 2.5.27 we get the following error:
>
> FreeMarker template error (HTML_DEBUG mode; use RETHROW in production!)
>
>
> Template inclusion failed (for parameter value 
> "/Empty{name='templateDir'}/Empty{name='expandTheme'}/scripting-events.ftl"):
> Template not found for name 
> "Empty{name='templateDir'}/Empty{name='expandTheme'}/scripting-events.ftl".
> The name was interpreted by this TemplateLoader: 
> org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader@679bd9e8.
>
> ----
> FTL stack trace ("~" means nesting-related):
> - Failed at: #include "/${parameters.templateDir}/...  [in template 
> "template/simple/a-close.ftl" at line 40, column 1]
> The problem is the following:
> In a jsp page we use a struts iterator to iterate a list of objects to 
> generate a link for each one. The objects do have a method "public 
> Map<String, Object> getParameters()".
> It seems that now FreeMarker calls the method getParameters from the object 
> on the stack to find the templateDir (that cannot be found) instead of using 
> the correct parameters as before with struts 2.5.26
>
> We now renamed the method getParameters() to solve the problem, but we do not 
> understand if it is a general issue with struts 2.5.27 or with this special 
> situation.

It's related to this change [1] and I will revert it soon as this
breaks previous behavior

[1] https://issues.apache.org/jira/browse/WW-5117


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to