tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pier...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TagLibraryInfoImpl.java
Date Thu, 05 Oct 2000 16:48:07 GMT
pierred     00/10/05 09:48:05

  Modified:    jasper/src/share/org/apache/jasper/compiler
                        TagLibraryInfoImpl.java
  Log:
  It is the tag <uri> in the TLD that sets the value of the
  'urn' field, not <urn>.
  
  And for more details:
  
  Referring to bug 214, Hans Bergsten wrote:
  > Looking at the code, it seems like it's a bug that an element named
  > "urn" is processed instead of the "uri" element. But I assume this
  > only means that the "uri" element is (incorrectly) ignored but that
  > the TLD is still parseable. Since the "uri" element is intended to
  > be used by development tools rather than the container, this should
  > not be a fatal problem.
  
  Correct.
  
  I must admit the spec is quite confusing on that matter.
  
  The confusion comes from the fact that the <uri> subelement of <taglib>
  in the TLD is mapped to the 'urn' field of TagLibraryInfo
  (which is accessible via the method getReliableURN()).
  
  This 'reliable urn' is not used anywhere else in the source base.
  As Hans mentioned, it is "intended to be used by development tools
  rather than the container".
  
  The code simply needs to be fixed by accepting the tag <uri> in the TLD
  instead of <urn>.
  
  [Wish the tag was named something like <reliableurn> in the
  TLD instead of <uri> to remove the confusion.
  
  And, for completeness, the 'uri' field of TagLibraryInfo is set
  via the 'uri' attribute of the taglib directive. It is accessible
  via the getURI() method of TagLibraryInfo]
  
  Submitted by:	Brian Bucknam
  
  Revision  Changes    Path
  1.4       +5 -4      jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TagLibraryInfoImpl.java	2000/10/04 05:10:51	1.3
  +++ TagLibraryInfoImpl.java	2000/10/05 16:48:01	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
1.3 2000/10/04 05:10:51 pierred Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/10/04 05:10:51 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
1.4 2000/10/05 16:48:01 pierred Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/10/05 16:48:01 $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -127,6 +127,7 @@
           print("shortname", shortname, out);
           print("urn", urn, out);
           print("info", info, out);
  +        print("uri", uri, out);
           print("tagLibraryValidator", tagLibraryValidator.toString(), out);
   
           for(int i = 0; i < tags.length; i++)
  @@ -378,7 +379,7 @@
                   Text t = (Text) e.getFirstChild();
                   if (t != null)
                       this.shortname = t.getData();
  -            } else if (tname.equals("urn")) {
  +            } else if (tname.equals("uri")) {
                   Text t = (Text) e.getFirstChild();
                   if (t != null)
                       this.urn = t.getData();
  
  
  

Mime
View raw message