I forgot to add, parms is a bean declared as such:

<bean:define id="parms" name="ParmDynaForm"
                         type="org.apache.struts.action.DynaActionForm">

and is used all over this JSP.  I don't get it.

:-> -----Original Message-----
:-> From: Randy Dillon 
:-> Sent: Friday, February 20, 2004 12:48 PM
:-> To: 'Struts Users Mailing List'
:-> Subject: Logic:iterate Exception
:-> 
:-> 
:-> I have logic that looks like this:
:-> 
:-> <% int n = 0;
:->    String strCat = ( (String[]) parms.get("cboCategory") )[n];
:->    out.println(strCat + strCat + strCat);
:-> %>
:-> <logic:iterate id="cat" indexId="i" 
:->                name="parms" property="cboCategory" >
:->     <logic:greaterThan value="0" name="i">, </logic:greaterThan>
:->     <%strCat=( (String[]) parms.get("cboCategory") )[n];%>
:->     <bean:write name="cat" />  
:->     <%=strCat%>
:-> </logic:iterate>
:-> 
:-> The scriptlets are strictly for debugging purposes, because 
:-> the <bean:write... causes this exception:
:-> 
:-> javax.servlet.jsp.JspException: Cannot find bean cat in scope page
:->     at 
:-> org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:717)
:->     at 
:-> org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:290)
:->     at _pages._product._orderdetail._jspService(orderdetail.jsp:48)
:-> 
:-> Otherwise, everthing in the code block above works.  In 
:-> fact, the code block (minus the scriptlets) was copied from 
:-> another page where it works without fail.  Isn't the 
:-> parms.get(...) doing the same thing as the <logic:iterate 
:-> ...> combined with the <bean:write ...>?
:-> 

Reply via email to