Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1968

Confusing error message when tag file's attribute type is unknown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Trivial Trivial
    • Jastow 2.0.10.Final
    • None
    • Servlet
    • None

      I have a JSP tag file that requires a "size" attribute:

      <%@ attribute name="size" required="true" type="Long" %>
      

      Because the type accidentally wasn't a FQN (it should have been a java.lang.Long), this error was generated:

      JBWEB004193: Unknown attribute type (size) for attribute Number
      

      The message doesn't make any sense. "size" isn't the attribute type and the attribute is not "Number". A possible fix:

      JBWEB004193: Unknown type (Number) was declared for attribute (size)
      

      PS: It's really important to talk about the "declaration" here because the tag file isn't mentioned at all in the exception. The Jasper compiler only reports the enclosing JSP, which makes it look like the problem is with the usage not the tag file itself.

            mjusko@redhat.com Marek Jusko
            mjusko@redhat.com Marek Jusko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: