Bug 33539 - TagLibraryInfoImpl warning while processing <tag-file> elements from JSP2.0 TLDs is misleading
Summary: TagLibraryInfoImpl warning while processing <tag-file> elements from JSP2.0 T...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 5.0.28
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-12 19:59 UTC by Rahul
Modified: 2005-03-23 07:48 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:59:26 UTC
When an unknown child element is found in a <tag-file> element while 
processing a JSP 2.0 TLD, TagLibraryInfoImpl produces a misleading error 
message [ a localized version of "Unknown element ({0}) in attribute" ]

This scenario has nothing to do with the attribute element.

The Japanese translation seemed a bit tricky at the onset, but I'm fully 
confident it is correct ;-)

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.2
diff -c -r1.2 TagLibraryInfoImpl.java
*** TagLibraryInfoImpl.java	12 Feb 2005 18:31:28 -0000	1.2
--- TagLibraryInfoImpl.java	12 Feb 2005 18:43:05 -0000
***************
*** 480,486 ****
              } else {
                  if (log.isWarnEnabled()) {
                      log.warn(Localizer.getMessage(
!                             "jsp.warning.unknown.element.in.attribute", 
tname));
                  }
              }
          }
--- 480,486 ----
              } else {
                  if (log.isWarnEnabled()) {
                      log.warn(Localizer.getMessage(
!                             "jsp.warning.unknown.element.in.tagfile", 
tname));
                  }
              }
          }


Index: messages.properties
===================================================================
RCS file: /usr/local/cvsroot/apache/jakarta-tomcat-5.0.28-src/jakarta-tomcat-
jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v
retrieving revision 1.1
diff -c -r1.1 messages.properties
*** messages.properties	12 Feb 2005 18:37:40 -0000	1.1
--- messages.properties	12 Feb 2005 18:43:35 -0000
***************
*** 153,158 ****
--- 153,159 ----
  jsp.error.badGetReader=Cannot create a reader when the stream is not buffered
  jsp.warning.unknown.element.in.taglib=Unknown element ({0}) in taglib
  jsp.warning.unknown.element.in.tag=Unknown element ({0}) in tag
+ jsp.warning.unknown.element.in.tagfile=Unknown element ({0}) in tag-file
  jsp.warning.unknown.element.in.attribute=Unknown element ({0}) in attribute
  jsp.warning.unknown.element.in.variable=Unknown element ({0}) in variable
  jsp.warning.unknown.element.in.validator=Unknown element ({0}) in validator


Index: messages_es.properties
===================================================================
RCS file: /usr/local/cvsroot/apache/jakarta-tomcat-5.0.28-src/jakarta-tomcat-
jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties,v
retrieving revision 1.1
diff -c -r1.1 messages_es.properties
*** messages_es.properties	12 Feb 2005 18:37:40 -0000	1.1
--- messages_es.properties	12 Feb 2005 18:44:34 -0000
***************
*** 151,156 ****
--- 151,157 ----
  jsp.error.badGetReader=No se puede crear un reader cuando el stream no tiene 
buffer
  jsp.warning.unknown.element.in.taglib=Elemento desconocido ({0}) en taglib
  jsp.warning.unknown.element.in.tag=Elemento desconocido ({0}) en tag
+ jsp.warning.unknown.element.in.tagfile=Elemento desconocido ({0}) en tag-file
  jsp.warning.unknown.element.in.attribute=Elemento desconocido ({0}) en 
attribute
  jsp.warning.unknown.element.in.variable=Elemento desconocido ({0}) en 
variable
  jsp.warning.unknown.element.in.validator=Elemento desconocido ({0}) en 
validator


Index: messages_fr.properties
===================================================================
RCS file: /usr/local/cvsroot/apache/jakarta-tomcat-5.0.28-src/jakarta-tomcat-
jasper/jasper2/src/share/org/apache/jasper/resources/messages_fr.properties,v
retrieving revision 1.1
diff -c -r1.1 messages_fr.properties
*** messages_fr.properties	12 Feb 2005 18:37:40 -0000	1.1
--- messages_fr.properties	12 Feb 2005 18:44:41 -0000
***************
*** 117,122 ****
--- 117,123 ----
  jsp.error.badGetReader=Impossible de créer un lecteur (reader) quand le flux 
n''utilse pas des tampons (not buffered)
  jsp.warning.unknown.element.in.TLD=Attention: Elément inconnu {0} dans le TLD
  jsp.warning.unknown.element.in.tag=Attention: Elément inconnu {0} dans le tag
+ jsp.warning.unknown.element.in.tagfile=Attention: Elément inconnu {0} dans 
le tag-file
  jsp.warning.unknown.element.in.attribute=Attention: Elément inconnu {0} dans 
l''attribute
  jsp.error.more.than.one.taglib=plus d''un taglib dans le TLD: {0}
  jsp.error.teiclass.instantiation=Impossible de charger ou d''instancier la 
classe TagExtraInfo: {0}


Index: messages_ja.properties
===================================================================
RCS file: /usr/local/cvsroot/apache/jakarta-tomcat-5.0.28-src/jakarta-tomcat-
jasper/jasper2/src/share/org/apache/jasper/resources/messages_ja.properties,v
retrieving revision 1.1
diff -c -r1.1 messages_ja.properties
*** messages_ja.properties	12 Feb 2005 18:37:40 -0000	1.1
--- messages_ja.properties	12 Feb 2005 18:44:50 -0000
***************
*** 150,155 ****
--- 150,156 ----
  jsp.error.badGetReader=\u30b9\u30c8\u30ea\u30fc\u30e0\u304c\u30d0\u30c3\u30d5
\u30a1\u30ea\u30f3\u30b0\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408
\u306b\u306f\u3001Reader\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093
  jsp.warning.unknown.element.in.taglib=taglib\u4e2d\u306b\u672a\u77e5
\u306e\u8981\u7d20 ({0}) \u304c\u3042\u308a\u307e\u3059
  jsp.warning.unknown.element.in.tag=tag\u4e2d\u306b\u672a\u77e5\u306e\u8981
\u7d20 ({0}) \u304c\u3042\u308a\u307e\u3059
+ jsp.warning.unknown.element.in.tagfile=tag-file\u4e2d\u306b\u672a\u77e5
\u306e\u8981\u7d20 ({0}) \u304c\u3042\u308a\u307e\u3059
  jsp.warning.unknown.element.in.attribute=attribute\u4e2d\u306b\u672a\u77e5
\u306e\u8981\u7d20 ({0}) \u304c\u3042\u308a\u307e\u3059
  jsp.warning.unknown.element.in.variable=variable\u4e2d\u306b\u672a\u77e5
\u306e\u8981\u7d20 ({0}) \u304c\u3042\u308a\u307e\u3059
  jsp.warning.unknown.element.in.validator=validator\u4e2d\u306b\u672a\u77e5
\u306e\u8981\u7d20 ({0}) \u304c\u3042\u308a\u307e\u3059
Comment 1 Yoav Shapira 2005-03-23 16:48:52 UTC
Done for 5.5.9.  Thanks for submitting this patch.