Don't know how to iterate over supplied "items" in <forEach>
HjavaNov 14 2010 — edited Nov 16 2010I try the following
I have form , bean , servlet and JSTL
in bean I have constructor like
public MyForm(String a_item) {
this.a_item = a_item;
}
in servlet
MYForm uf = new MyForm(a_item);
userSession.setAttribute("underform", uf);
in jstl
I have
<c:forEach items="${sessionScope.underform}" var="found">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr><td align="left" valign="top">
<c:if test="${found.a_item=='on' }">
<li> <input type="checkbox" name="a_item" checked></li>
</c:if>
</td>
</tr>
</table>
I GET THE ERR Don't know how to iterate over supplied "items" in <forEach>
HOW CAN I Persisting data by the request by as an object ??
thank you!