Many thanks Jan and Kin-Man. But there is still a problem - now if you have: <logic:iterate id='i' > </logic:iterate>
<logic:iterate id='i' > </logic:iterate> ( i.e. the same variable name ), it will fail with duplicated declaration, the code will be: Object i; ... Object i; ( id is nested ). As I mentioned, the 4.1.4 milestone doesn't have this problem ( it has others, but easier to get around ). Costin On Thu, 20 Jun 2002, Jan Luehe wrote: > Hi Costin, > > > More info: > > > > The page is: > > > > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> > > > > <logic:iterate id="id1" name="name1" property="prop1"> > > <logic:iterate id="id2" name="name2" property="prop2"> > > Foo > > </logic:iterate> > > </logic:iterate> > > > > I get: > > > > a$jsp.java:75:25:75:25: Error: No entity named "id2" was found in this > > environment. > > > > And the generated code is: > > ..... > > /* ---- logic:iterate ---- */ > > java.lang.Object _jspx_id2_1; > > _jspx_id2_1 = id2; > > org.apache.struts.taglib.logic.IterateTag > > _jspx_th_logic_iterate_1 = (org.apache.struts.taglib.logic.IterateTag) > > > _jspx_tagPool_logic_iterate_property_name_id.get(org.apache.struts.taglib.logic. > > IterateTag.class); > > > > .... > > > > No 'id2' is ever declared. > > I was unable to reproduce the problem where a scripting variable is being > declared multiple times. That used to be a bug with Jasper, which we > fixed in Jasper2. > > However, I was able to reproduce the above problem with nested > <logic:iterate> tags where 'id2' is never declared. > > The nested <logic:iterate> did not declare any of its NESTED scripting > variables, since it assumed that those had already been declared by the > encapsulating <logic:iterate>. This approach did not take into account > the case where a tag's TEI determines the name of a scripting > variable from the tag's "id" attribute. > > Attached is a patch that fixes the problem. Kin-Man has volunteered > to apply it. I still don't seem to have commit privileges for tomcat. > > Let me know if you still run into any problems. > > Thanks, > > > Jan > > > > > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>