Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2019

[taglib] Add better error reporting to bean:define tag

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Future
    • 1.2.8
    • Tag Libraries
    • 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.

      Attachments

        Activity

          People

            dsevans93 David Evans
            apache@rainking888.endjunk.com Doug Daniels
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: