Bug 33538 - TagLibraryInfoImpl does not process <tag-file> elements correctly from JSP 2.0 TLDs
TagLibraryInfoImpl does not process <tag-file> elements correctly from JSP 2....
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Jasper
5.0.28
PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2005-02-12 19:24 UTC by Rahul
Modified: 2005-03-23 07:41 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rahul 2005-02-12 19:24:57 UTC
The XML schema for JSP 2.0 TLDs [ http://java.sun.com/xml/ns/j2ee/web-
jsptaglibrary_2_0.xsd ] specifies that xsd:complexType tagFileType may have 
any number of example or tag-extension child elements.

Jasper2 does not ignore these elements while processing the TLDs (as it 
should) and incorrectly logs warnings.

Patch:

Index: TagLibraryInfoImpl.java
===================================================================
RCS file: /usr/local/cvsroot/apache/jakarta-tomcat-5.0.28-src/jakarta-tomcat-
jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
retrieving revision 1.1
diff -c -r1.1 TagLibraryInfoImpl.java
*** TagLibraryInfoImpl.java	12 Feb 2005 17:51:54 -0000	1.1
--- TagLibraryInfoImpl.java	12 Feb 2005 17:57:25 -0000
***************
*** 473,478 ****
--- 473,482 ----
                  name = child.getBody();
              } else if ("path".equals(tname)) {
                  path = child.getBody();
+             } else if ("example".equals(tname)) {
+                 // Ignore <example> element
+             } else if ("tag-extension".equals(tname)) {
+                 // Ignore <tag-extension> element
              } else {
                  if (log.isWarnEnabled()) {
                      log.warn(Localizer.getMessage(
Comment 1 Yoav Shapira 2005-03-23 16:41:59 UTC
Done for 5.5.9.  Thanks for submitting this patch.