Hi Costin, > 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 ).
The above code fragment compiles fine for me. I've attached the generated servlet code. Can you send me the exact page you are trying to run? If you could provide the generated code, that would help, too. Thanks, Jan
package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import org.apache.jasper.runtime.*; public class test1$jsp extends HttpJspBase { private static java.util.Vector _jspx_includes; private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_logic_iterate_id; public test1$jsp() { _jspx_tagPool_logic_iterate_id = new org.apache.jasper.runtime.TagHandlerPool(); } public java.util.List getIncludes() { return _jspx_includes; } public void jspDestroy() { _jspx_tagPool_logic_iterate_id.release(); } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\n\n"); /* ---- logic:iterate ---- */ java.lang.Object i; org.apache.struts.taglib.logic.IterateTag _jspx_th_logic_iterate_0 = (org.apache.struts.taglib.logic.IterateTag) _jspx_tagPool_logic_iterate_id.get(org.apache.struts.taglib.logic.IterateTag.class); _jspx_th_logic_iterate_0.setPageContext(pageContext); _jspx_th_logic_iterate_0.setParent(null); _jspx_th_logic_iterate_0.setId("i"); int _jspx_eval_logic_iterate_0 = _jspx_th_logic_iterate_0.doStartTag(); if (_jspx_eval_logic_iterate_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { if (_jspx_eval_logic_iterate_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) { javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody(); _bc.clear(); out = _bc; _jspx_th_logic_iterate_0.setBodyContent(_bc); _jspx_th_logic_iterate_0.doInitBody(); } do { i = (java.lang.Object) pageContext.findAttribute("i"); out.write(" \n"); } while (_jspx_th_logic_iterate_0.doAfterBody() == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN); if (_jspx_eval_logic_iterate_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) out = pageContext.popBody(); } if (_jspx_th_logic_iterate_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; _jspx_tagPool_logic_iterate_id.reuse(_jspx_th_logic_iterate_0); out.write("\n\n"); /* ---- logic:iterate ---- */ org.apache.struts.taglib.logic.IterateTag _jspx_th_logic_iterate_1 = (org.apache.struts.taglib.logic.IterateTag) _jspx_tagPool_logic_iterate_id.get(org.apache.struts.taglib.logic.IterateTag.class); _jspx_th_logic_iterate_1.setPageContext(pageContext); _jspx_th_logic_iterate_1.setParent(null); _jspx_th_logic_iterate_1.setId("i"); int _jspx_eval_logic_iterate_1 = _jspx_th_logic_iterate_1.doStartTag(); if (_jspx_eval_logic_iterate_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { if (_jspx_eval_logic_iterate_1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) { javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody(); _bc.clear(); out = _bc; _jspx_th_logic_iterate_1.setBodyContent(_bc); _jspx_th_logic_iterate_1.doInitBody(); } do { i = (java.lang.Object) pageContext.findAttribute("i"); out.write("\n"); } while (_jspx_th_logic_iterate_1.doAfterBody() == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN); if (_jspx_eval_logic_iterate_1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) out = pageContext.popBody(); } if (_jspx_th_logic_iterate_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; _jspx_tagPool_logic_iterate_id.reuse(_jspx_th_logic_iterate_1); out.write("\n\n"); } catch (Throwable t) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>