struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randy Dillon" <randy.dil...@sitestuff.com>
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" />  
	<%=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 ...>?
Mime
View raw message