File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes struts -- Cannot find bean under name indexedWorkInProgressVO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts -- Cannot find bean under name indexedWorkInProgressVO " Watch "struts -- Cannot find bean under name indexedWorkInProgressVO " New topic
Author

struts -- Cannot find bean under name indexedWorkInProgressVO

Ugender Rekulampally
Ranch Hand

Joined: Nov 14, 2005
Posts: 130
Hi All,
I have a jsp page which displays valus by reading a list objects. it workd fine when the list has values. but when the list is empty, I see below error message.




I have a drop down also there in my code to display ...can some one have a look at my code and see why it is even going into the loop when the size is zero (0)?


Here is the code





even i tried having a 'IF' condition saying enter the 'for' loop only when the list size is more than zero. I dont see the print out statement in the 'IF' loop when the list size is zero but i get the error saying 'indexedWorkInProgressVO' cant be find. I am guessing this is something to do with the drop down list? <html:select>? can any one give me some guidence to how to go about?

Thanks,
Ugender
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Use <logic :p resent tag, instead of if .. else statement

here is how ,



You can use <logic:notPresent , to show "no data found" error !
[ September 30, 2008: Message edited by: Sagar Rohankar ]

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Ugender Rekulampally
Ranch Hand

Joined: Nov 14, 2005
Posts: 130
Sagar,

It worked. Thanks.

I used if statement inside the for loop. I am sure you also meant that way only.



Thanks.
Ugender
 
wood burning stoves
 
subject: struts -- Cannot find bean under name indexedWorkInProgressVO
 
Similar Threads
Problem with the drop down box using Struts tags
Update user profile
Logic:iterate + Indexed property issue
problems with html:select - need help - struts tag library
Editing and submitting multiple records