The jsp spec said that a jsp tag handler should not change tag 
attribute values. This is to allow tag reuse without setting again the 
tag attributes.
  Previous versions of  Tomcat was not reuse tags, but latest version do !
In the previous implementation of  UseAttributeTag, the "id" attribute 
was set by the handler if it was not defined. Next call (reuse) to the 
handler only set "name", and found the "id" set to a wrong value.
  The new implementation doesn't touch any tag attribute values.
  I don't know if "id" should be reseted in base class release(). The 
fact that it is not  was causing trouble to some container doing reuse. 
I haven't found any comment about that in spec when I had corrected this 
old bug. Maybe someone has more info ?

        Cedric

Karr, David wrote:

>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 07, 2002 8:44 AM
>>To: [EMAIL PROTECTED]
>>Subject: cvs commit:
>>jakarta-struts/src/share/org/apache/struts/taglib/tiles
>>UseAttributeTag.java
>>
>>  Log:
>>  Correct a bug where the property "id" is not set properly 
>>when the tag is reused.
>>    
>>
>
>  
>
>>     public int doStartTag() throws JspException
>>       {
>>  +      // Do a local copy of id
>>  +    String id=this.id;
>>       if( id==null )
>>         id=attributeName;
>>    
>>
>
>Would you mind elaborating on this a bit, Cedric?  Why do you need to to do
>this?
>
>I also noticed that the "release()" method is resetting the "id" field,
>apparently due to a bug in TagSupport?  Is this really a bug in the base JSP
>api?
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>  
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to