Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Future
-
None
-
Operating System: other
Platform: All
-
27861
Description
The bean:define tag in the Struts Bean taglib could use better error reporting.
It is extremely difficult to debug the common error of trying to define a bean
that is actually null (say, for example, if you typed the name incorrectly).
Whenever bean:define tries to set a value that is null, it errors out with the
following message:
[ServletException in:/WEB-INF/components/Test.jsp] Define tag cannot set a null
value']
If you have more than one bean:define tag in your JSP, you can't even tell which
one is generating the error. This makes the debugging process incredibly laborious.
The gains from a simple addition to the error message (such as 'for bean with
id=x') would be huge. Is this possible?
If possible, the gains from a more complex error reporting that was aware of
where a null value occurred (at which point in the name.property chain) would be
even larger.