M
Ming
logic:iterate question
Reply to all
Forward
Reply by chat
Filter messages like this
Print
Add to Contacts list
Delete this message
Report phishing
Report not phishing
Show original
Message text garbled?
Why is this spam/nonspam?
Minghui Yu to Struts
show details 6:58 PM (19 minutes ago)
Reply
in Action:
....
Set<Book> books=bdao.findAllBooks();
request.setAttribute("books", books);
....
In JSP:
<logicresent name="books">
All Books:<br/><br/>
<logic:iterate id="book" name="books">
<bean:write name="book" property="title" /><br/>
</logic:iterate>
</logicresent>
--
The line ( <bean:write name="book" property="title" /><br/>throws an
exception:
Root Cause:
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot
find bean: "book" in any scope
(there is getTitle method for Book)
Any idea why I made mistake?
Thanks,
Thanks & Have a good day,
YU, Minghui
Reply
Forward
Reply to all
Forward
Reply by chat
Filter messages like this
Add to Contacts list
Delete this message
Report phishing
Report not phishing
Show original
Message text garbled?
Why is this spam/nonspam?
Minghui Yu to Struts
show details 6:58 PM (19 minutes ago)
Reply
in Action:
....
Set<Book> books=bdao.findAllBooks();
request.setAttribute("books", books);
....
In JSP:
<logicresent name="books">
All Books:<br/><br/>
<logic:iterate id="book" name="books">
<bean:write name="book" property="title" /><br/>
</logic:iterate>
</logicresent>
--
The line ( <bean:write name="book" property="title" /><br/>throws an
exception:
Root Cause:
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot
find bean: "book" in any scope
(there is getTitle method for Book)
Any idea why I made mistake?
Thanks,
Thanks & Have a good day,
YU, Minghui
Reply
Forward