You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Christian Stone <xt...@stonescape.net> on 2009/10/28 02:45:22 UTC
Enhanced freemarker decorator reporting.
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]
...