struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randy Dillon" <>
Subject Logic:iterate Exception
Date Fri, 20 Feb 2004 18:48:01 GMT
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" />  

The scriptlets are strictly for debugging purposes, because the <bean:write... causes this

javax.servlet.jsp.JspException: Cannot find bean cat in scope page
	at org.apache.struts.util.RequestUtils.lookup(
	at org.apache.struts.taglib.bean.WriteTag.doStartTag(
	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 ...>?
View raw message