jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes Cannot find bean in any scope Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Cannot find bean in any scope Error" Watch "Cannot find bean in any scope Error" New topic
Author

Cannot find bean in any scope Error

AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Hi,

With the following code:

<logic:iterate name="vHvnsDriverVec" id="vHvnsDriver1" scope="request">
<tr>
<td><bean:write name="vHvnsDriver1" property="driverNo"/></td>
<td><bean:write name="vHvnsDriver1" property="licenceNumber"/></td>
<td><bean:write name="vHvnsDriver1" property="licenceState"/></td>
</tr>
</logic:iterate>

In the action i can see that the vHvnsDriverVec contains several
entries.
I am also seeting it.
httpServletRequest.setAttribute("vHvnsDriverVec", vHvnsDriverVec);

In the jsp the vHvnsDriverVec is not empty( i tested this with <logic:notempty> but the values are not displayed. I also tested the vector in the jsp and it is not null.

I am getting a 'Cannot find bean vHvnsDriver1 in any scope Error


What am i doing wrong?

Thanks in advance

Anil
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
try to use logic resent or logic:notPresent check attribute in request scope.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Thanks for the reply.

Actually the Vec was not setup properly. There were some null objects in the the vector.

Thanks

Anil
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot find bean in any scope Error
 
Similar Threads
problem to get values in hasmap in bean:write
Cannot find bean coursesList in any scope
JSP Processing Error
Cannot find bean in any scope...
Struts Logic Tag problem