Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-206

TLDs in myfaces-examples.war contain duplicated attributes for some tags which prevents the war from working in ServletExec 5.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.9m9
    • 1.1.0
    • General
    • None
    • Win XP Pro, JDK 1.5.0_01 using SE 5.0 AS running with it's built-in webserver

    Description

      From what I can tell, the myfaces-examples.war (from both myfaces-1.0.9rc3-app.tgz AND myfaces-1.0.8-examples.tgz)
      has TLD files (inside it's myfaces.jar file) that appear to be incorrect.

      For example, looking in the myfaces_html.tld file... looking in the <tag> named "outputLink", it contains:


      <attribute>
      <name>target</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      </attribute>

      <!-- HtmlOutputLink attributes -->

      <attribute>
      <name>target</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      </attribute>

      That's the same name for 2 attributes... for the same tag.
      That seems wrong to me.
      What if that duplicated attribute name was using different values for the <required> or <rtexprvalue> nodes?
      Which one would the JSP Engine be expected to use?

      And looking in myfaces_ext.tld looking at the tag named "inputHtml". It see that it defines:

      <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      </attribute>

      and also

      <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <type>java.lang.String</type>
      <description>Every component may have an unique id. Automatically created if omitted.</description> </attribute>

      They are slightly different.

      Tomcat 5 does not appear to complain or report this, and things work fine there.
      But other Servlet/JSP Engines (not just SE) may perform validation on the TLD and complain about the duplicated attributes which may prevent the app from functioning.

      Duplicated attributes in a TLD seems ambiguous to me.
      From what I can tell, the JSP 2.0 specification does not say anything definitive (one way or the
      other) about the case of a TLD using the same attribute name for the same tag more than once.
      But common sense tells me it should not be done.

      Does it make sense for a TLD to do this?
      Doesn't MyFaces need to correct their TLD files in these cases?

      If I rig SE so that it doesn't check for duplicated attributes in a TLD, the app deploys and runs fine.
      But I don't think that SE should have to be altered in this way (unless someone has found information that I haven't... if so please share that with me).
      Otherwise, I think that the TLDs used in this MyFaces example need to be corrected.

      Other examples I've found so far in myfaces_ext.tld include:

      1. the attribute named "onblur" for the tag named "commandNavigation"
      2. the attribute named "onfocus" for the tag named "commandNavigation"
      3. the attribute named "id" for the tag named "inputHtml"
      4. the attribute named "style" for the tag named ... (Here is where I stopped debugging this).

      Thanks for your time,

      Matt McGinty
      Software Engineer
      New Atlanta Communications, LLC
      http://www.newatlanta.com

      Attachments

        1. myfaces_html.tld
          147 kB
          Matt McGinty
        2. myfaces_ext.tld
          290 kB
          Matt McGinty

        Activity

          People

            schof Sean Schofield
            mattmcginty@mindspring.com Matt McGinty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: