Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot find bean XX in scope null... frustrating

843835Dec 2 2002 — edited May 29 2008
PLEASE HELP ME!! I have wasted two days solving this problem. I didn't know struts could be this much frustrating. whenever I use logic:iterate tag i am getting this problem. I have a jsp page in which I provide a search criteria for some search. In the action class I am looking a session bean and getting the search results. Also I am setting the form bean for the next page to be displayed:
request.setAttribute("searchResults", resultForm);
Now in the next jsp page I am trying to retrieve the search results by logic:iterate tag like:
<logic:iterate id="item" name="searchCustomerResults" type="">
<tr align="center" bgcolor="#EEEEEE">
<td><font face="Arial" size="2"><bean:write name="item" property="customerId"/></font></td>
<td><font face="Arial" size="2"><bean:write name="item" property="customerName"/></font></td>
<td><font face="Arial" size="2"><bean:write name="item" property="segmentCategory"/></font></td>
<td><font face="Arial" size="2"><bean:write name="item" property="salesTerritory"/></font></td>
<td><font face="Arial" size="2"><bean:write name="item" property="creditStopIndicator"/></font></td>
<td><font face="Arial" size="2"><bean:write name="item" property="status"/></font></td>
<td><font face="Arial" size="2"><bean:write name="item" property="effectiveDate"/></font></td>
</tr>
</logic:iterate>

Again and again I am getting this error:
javax.servlet.jsp.JspException: Cannot find bean item in scope null

I have tried several combinations. I have tried putting this logic inside html:form tags.. nothing is working. Please help me.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2008
Added on Dec 2 2002
17 comments
2,604 views