> Date: Tue, 18 Jun 2002 11:04:10 +0100 > From: [EMAIL PROTECTED] > Subject: RE: Jasper2: serious problem with tag declarations > To: [EMAIL PROTECTED] > MIME-version: 1.0 > X-MIMEOLE: Produced By Microsoft Exchange V6.0.5762.3 > Content-transfer-encoding: quoted-printable > Content-class: urn:content-classes:message > Delivered-to: mailing list [EMAIL PROTECTED] > Thread-topic: Jasper2: serious problem with tag declarations > Thread-index: AcIWizWxrE/eTDHgQNOcNern1B02QQAIq6BA > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > X-Antivirus: nagoya (v4198 created Apr 24 2002) > X-WDR-Disclaimer: Version $Revision: 1.15 $ > X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > List-Post: <mailto:[EMAIL PROTECTED]> > List-Subscribe: <mailto:[EMAIL PROTECTED]> > List-Unsubscribe: <mailto:[EMAIL PROTECTED]> > List-Help: <mailto:[EMAIL PROTECTED]> > List-Id: "Tomcat Developers List" <tomcat-dev.jakarta.apache.org> > X-OriginalArrivalTime: 18 Jun 2002 10:04:11.0284 (UTC) FILETIME=[7E3D7540:01C216AF] > > The scope of scripting variables from tags is specified in the Tag. From the 1.1 spec: > > The defined values for scope are: > · NESTED, if the scripting variable is available between the start tag and the end tag of the > action that defines it. > · AT_BEGIN, if the scripting variable is available from the start tag of the action that > defines it until the end of the page. > · AT_END, if the scripting variable is available after the end tag of the action that defines > it until the end of the page. > The scope value for a variable implies what methods may affect its value... > > -------------------- > So while declaring two id's the same is an error IMO, the specific tag <logic:iterate> should probably be NESTED rather than AT_BEGIN (which is what's happening). > > Checking the struts code (org.apache.struts.taglib.logic.IterateTei), it is indeed declared as NESTED. Looks like a Jasper 2 bug then. Time for a few extra {}'s? >
Having extra {}'s is not going to work, because it's not legal java to have variables of the same name in a method, even if one is in the block nested with another block containing the other. There was a problem with scripting variables when a tag is nested in the same tag, because of the above problem. But that has been fixed recently in jasper2. If costin's page works in old jasper, but not in jasper2, then it must be something else. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 18 June 2002 06:44 > To: Tomcat Developers List; Kin-Man Chung > Subject: Re: Jasper2: serious problem with tag declarations > > > On Mon, 17 Jun 2002, Kin-Man Chung wrote: > > > Costin, > > > > I am not aware that "id" attribute is handled differently in a tag. > > Can you give a test case for this? I can look into it more. Thanks. > > I'll try to extract a test case. > > There is nothing special about 'id' - just 2 consecutive struts > <logic:iterate id='foo' >. This generates a variable 'foo' > ( via TLD/TagInfo/etc ), and the problem is that the variable foo is > declared twice ( there are 2 'Object foo;' in the same scope ). > > I'm not very familiar with struts ( but you may find some > experts on this list :-), but unless I'm doing something very > stupid in the page, this issue may be serious. > > Costin > > > > > > - Kin-man > > > > > Date: Mon, 17 Jun 2002 10:41:07 -0700 (PDT) > > > From: [EMAIL PROTECTED] > > > Subject: Jasper2: serious problem with tag declarations > > > X-X-Sender: [EMAIL PROTECTED] > > > To: List Tomcat-Dev <[EMAIL PROTECTED]> > > > MIME-version: 1.0 > > > Delivered-to: mailing list [EMAIL PROTECTED] > > > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > > > X-Antivirus: nagoya (v4198 created Apr 24 2002) > > > X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > > > X-Authentication-warning: costinm.sfo.covalent.net: costin owned process doing > > -bs > > > List-Post: <mailto:[EMAIL PROTECTED]> > > > List-Subscribe: <mailto:[EMAIL PROTECTED]> > > > List-Unsubscribe: <mailto:[EMAIL PROTECTED]> > > > List-Help: <mailto:[EMAIL PROTECTED]> > > > List-Id: "Tomcat Developers List" <tomcat-dev.jakarta.apache.org> > > > > > > > > > I see some errors, not sure yet if it's an error in the taglibs or > > > jasper but seems serious. ( the taglibs are from struts ). > > > > > > There are few <logic:iterate id="foo" > tags in the page, using the > > > same id, and the generated code has: > > > Object foo; > > > .... > > > > > > Object foo; > > > ... > > > > > > That obviously doesn't compile. > > > > > > I don't know too much about struts, but I suppose it is valid to use > > > the same value in 2 tag attributes, couldn't find any reference on > > > the contrary in the spec. > > > > > > It workes fine with older jasper. > > > > > > Costin > > > > > > > > > > > > -- > > > 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]> > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > Visit our website at http://www.ubswarburg.com > > This message contains confidential information and is intended only > for the individual named. If you are not the named addressee you > should not disseminate, distribute or copy this e-mail. Please > notify the sender immediately by e-mail if you have received this > e-mail by mistake and delete this e-mail from your system. > > E-mail transmission cannot be guaranteed to be secure or error-free > as information could be intercepted, corrupted, lost, destroyed, > arrive late or incomplete, or contain viruses. The sender therefore > does not accept liability for any errors or omissions in the contents > of this message which arise as a result of e-mail transmission. If > verification is required please request a hard-copy version. This > message is provided for informational purposes and should not be > construed as a solicitation or offer to buy or sell any securities or > related financial instruments. > > > -- > 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]>