You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by BugRat Mail System <to...@cortexity.com> on 2000/10/05 01:30:13 UTC

BugRat Report #214 has been filed.

Bug report #214 has just been filed.

You can view the report at the following URL:

   <http://znutar.cortexity.com:8888/BugRatViewer/ShowReport/214>

REPORT #214 Details.

Project: Jasper
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: medium
Severity: critical
Confidence: public
Environment: 
   Release: 3.1, 3.2b4
   JVM Release: any
   Operating System: any
   OS Release: any
   Platform: any

Synopsis: 
Taglib TLD parsing does not match JSP spec

Description:
JSP spec (and DTD) calls for the 'taglib' element of the
TLD to contain a sub-element called 'uri'.
TagLibraryInfoImpl.java, however, accepts only 'urn' in
the parseTLD() method.
TagLibraryInfoImpl has both a urn and uri member, and I
believe there is some confusion in the code regarding
their use.

As the code stands, tag libraries don't seem to work at
all -- if I change taglib.tld to have a 'urn' element,
parseXMLDoc() fails because the XML does not match the
DTD.  If I leave it as a 'uri' element, 
jsp.warning.unknown.element.in.TLD is triggered.


Re: BugRat Report #214 has been filed.

Posted by Pierre Delisle <pi...@sun.com>.
> 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]

	-- Pierre

Re: BugRat Report #214 has been filed.

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
BugRat Mail System wrote:
> 
> Bug report #214 has just been filed.
> 
> You can view the report at the following URL:
> 
>    <http://znutar.cortexity.com:8888/BugRatViewer/ShowReport/214>
> 
> REPORT #214 Details.
> 
> Project: Jasper
> Category: Bug Report
> SubCategory: New Bug Report
> Class: swbug
> State: received
> Priority: medium
> Severity: critical
> Confidence: public
> Environment:
>    Release: 3.1, 3.2b4
>    JVM Release: any
>    Operating System: any
>    OS Release: any
>    Platform: any
> 
> Synopsis:
> Taglib TLD parsing does not match JSP spec
> 
> Description:
> JSP spec (and DTD) calls for the 'taglib' element of the
> TLD to contain a sub-element called 'uri'.
> TagLibraryInfoImpl.java, however, accepts only 'urn' in
> the parseTLD() method.
> TagLibraryInfoImpl has both a urn and uri member, and I
> believe there is some confusion in the code regarding
> their use.
> 
> As the code stands, tag libraries don't seem to work at
> all -- if I change taglib.tld to have a 'urn' element,
> parseXMLDoc() fails because the XML does not match the
> DTD.  If I leave it as a 'uri' element,
> jsp.warning.unknown.element.in.TLD is triggered.

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.

I have used Tomcat 3.2 Beta 4 with many tag libraries that use the "uri" 
element in the TLD without problem.

Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com