I enhanced the FreemarkerDecoratorServlet to increase the error reporting beyond what was there before. If there is an error, you will now get the request and resultCode with the error (instead of just the decorator name and the property that was missing). I didn't think the action name was necessary, since it can be inferred much of the time. However, the result code is quite meaningful, and knowing this without having to go back and pour over log files is a boon.

I wanted to report this, since there has been historically many complaints about the error reporting from Freemarker and Struts, and I am looking for places where the error is being swallowed or the error is vague so I can clear them up.

-- Christian


[2009-10-27 21:28:33,322]

ERROR

org.apache.struts2.sitemesh.FreemarkerDecoratorServlet

Error applying freemarker template to
      request: http://localhost:8080/?null with resultCode: success.

Error on line 45, column 13 in decorators/main.ftl
request.getAttribute("settingsx") is undefined.
It cannot be assigned to settings

Error on line 45, column 13 in decorators/main.ftl
request.getAttribute("settingsx") is undefined.
It cannot be assigned to settings
The problematic instruction:
----------
==> assignment: settings=request.getAttribute("settingsx") [on line 45, column 13 in decorators/main.ftl]
...

Reply via email to