Bug 46187 - problem with XTAG:attribute on Tomcat 5.5
Summary: problem with XTAG:attribute on Tomcat 5.5
Status: RESOLVED LATER
Alias: None
Product: Taglibs
Classification: Unclassified
Component: XTags Taglib (show other bugs)
Version: unspecified
Hardware: Sun Solaris
: P2 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-11 07:56 UTC by rangan
Modified: 2009-11-29 19:48 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rangan 2008-11-11 07:56:24 UTC
Hi,

I am using apache Tomcat 5.5 to run my web application. Following is the code snippet from a JSP which generates incorrect results on Tomcat:

<LOGIC:iterate id="article" name="articleList">
	<XTAG:element name="Address">
		<XTAG:attribute name="format">Simple</XTAG:attribute>
		< %-- Display article address information --%>
		<ARTICLE :field  field=«articleAddress« /> 		
	</XTAG :element>
</LOGIC:iterate>

For example, the articleList size is 3 then the XML should be generated as below:

<Address format=”Simple”>
	Sample Address 1
</Address>
<Address format=”Simple”>
	Sample Address 2
</Address>
<Address format=”Simple”>
	Sample Address 3 
</Address>

This works correctly on WebSphere but the same piece of code generates the following output on Tomcat:

<Address format=”Simple” format=”Simple” format=”Simple”>
	Sample Address 1
</Address>
<Address format=”Simple” format=”Simple” format=”Simple”>
	Sample Address 2
</Address>
<Address format=”Simple” format=”Simple” format=”Simple”>
	Sample Address 3
</Address>

On Tomcat when an <XTAG:attribute is present inside a loop (Logic:iterate) then the attribute gets duplicated in the parent node a number of times.
The XML generated on Tomcat becomes invalid because in an XML a node element can’t have duplicate attributes.

Pls let us know if there is any existing bug for the same issue for which we can take a patch or is this still an open bug ?

Thanks
-R
Comment 1 Henri Yandell 2008-11-14 17:23:32 UTC
Not sure if it existed before - it feels familiar but I can't see anything. We should make a Cactus test for this to see if it exists in the current trunk code.
Comment 2 rangan 2008-11-23 23:15:17 UTC
Is there any update on this issue ?
Comment 3 Henri Yandell 2009-11-29 19:48:12 UTC
Resolving. Taglib has been retired.